diff --git a/generation_config.yaml b/generation_config.yaml index 0b90bed6932d..a3378775fb1a 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.68.0 -googleapis_commitish: 456866bff20ee005cbc248b3478c577d28304e60 +googleapis_commitish: 8d52a0bd5332bec365647fd792102a25a665e9fe libraries_bom_version: 26.79.0 libraries: - api_shortname: accessapproval diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json index edb6fa34d537..4d12e1024b65 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json @@ -647,6 +647,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.AggregationOutput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.AggregationOutput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.AggregationResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.AggregationResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.Annotation", "queryAllDeclaredConstructors": true, @@ -998,6 +1034,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.AutoraterConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.AutoraterConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.AutoscalingMetricSpec", "queryAllDeclaredConstructors": true, @@ -2393,6 +2447,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec$ComputationBasedMetricType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.ComputeTokensRequest", "queryAllDeclaredConstructors": true, @@ -2483,6 +2564,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.ContentMap", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ContentMap$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ContentMap$Contents", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ContentMap$Contents$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.Context", "queryAllDeclaredConstructors": true, @@ -3878,6 +3995,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.CustomOutput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CustomOutput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CustomOutputFormatConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CustomOutputFormatConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.DataItem", "queryAllDeclaredConstructors": true, @@ -5741,6 +5894,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.EvaluateDatasetResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.EvaluateDatasetResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.EvaluateDatasetRun", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.EvaluateDatasetRun$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.EvaluateInstancesRequest", "queryAllDeclaredConstructors": true, @@ -5822,6 +6011,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.EvaluationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.EvaluationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.EvaluationDataset", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.EvaluationDataset$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.Event", "queryAllDeclaredConstructors": true, @@ -10448,6 +10673,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.LLMBasedMetricSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.LLMBasedMetricSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.LargeModelReference", "queryAllDeclaredConstructors": true, @@ -12725,6 +12968,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.Metric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Metric$AggregationMetric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Metric$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.MetricResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.MetricResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.MetricxInput", "queryAllDeclaredConstructors": true, @@ -14588,6 +14876,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.OutputConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.OutputConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.OutputFieldSpec", "queryAllDeclaredConstructors": true, @@ -14615,6 +14921,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.OutputInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.OutputInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.PSCAutomationConfig", "queryAllDeclaredConstructors": true, @@ -15389,6 +15713,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.PredefinedMetricSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PredefinedMetricSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.PredefinedSplit", "queryAllDeclaredConstructors": true, @@ -17081,6 +17423,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.RawOutput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.RawOutput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.RawPredictRequest", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EvaluationServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EvaluationServiceClientTest.java index 6e48efa01055..dbcf20177596 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EvaluationServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EvaluationServiceClientTest.java @@ -102,7 +102,10 @@ public void tearDown() throws Exception { @Test public void evaluateInstancesTest() throws Exception { - EvaluateInstancesResponse expectedResponse = EvaluateInstancesResponse.newBuilder().build(); + EvaluateInstancesResponse expectedResponse = + EvaluateInstancesResponse.newBuilder() + .addAllMetricResults(new ArrayList()) + .build(); mockEvaluationService.addResponse(expectedResponse); EvaluateInstancesRequest request = diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClientTest.java index c4848f9ca795..9e971a0779e8 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClientTest.java @@ -128,6 +128,7 @@ public void createTuningJobTest() throws Exception { .setTuningDataStats(TuningDataStats.newBuilder().build()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") + .addAllEvaluateDatasetRuns(new ArrayList()) .build(); mockGenAiTuningService.addResponse(expectedResponse); @@ -185,6 +186,7 @@ public void createTuningJobTest2() throws Exception { .setTuningDataStats(TuningDataStats.newBuilder().build()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") + .addAllEvaluateDatasetRuns(new ArrayList()) .build(); mockGenAiTuningService.addResponse(expectedResponse); @@ -242,6 +244,7 @@ public void getTuningJobTest() throws Exception { .setTuningDataStats(TuningDataStats.newBuilder().build()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") + .addAllEvaluateDatasetRuns(new ArrayList()) .build(); mockGenAiTuningService.addResponse(expectedResponse); @@ -296,6 +299,7 @@ public void getTuningJobTest2() throws Exception { .setTuningDataStats(TuningDataStats.newBuilder().build()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") + .addAllEvaluateDatasetRuns(new ArrayList()) .build(); mockGenAiTuningService.addResponse(expectedResponse); @@ -506,6 +510,7 @@ public void rebaseTunedModelTest() throws Exception { .setTuningDataStats(TuningDataStats.newBuilder().build()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") + .addAllEvaluateDatasetRuns(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -571,6 +576,7 @@ public void rebaseTunedModelTest2() throws Exception { .setTuningDataStats(TuningDataStats.newBuilder().build()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") + .addAllEvaluateDatasetRuns(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationOutput.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationOutput.java new file mode 100644 index 000000000000..4f2e58be841e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationOutput.java @@ -0,0 +1,1231 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The aggregation result for the entire dataset and all metrics.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AggregationOutput} + */ +@com.google.protobuf.Generated +public final class AggregationOutput extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.AggregationOutput) + AggregationOutputOrBuilder { + 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= */ "", + "AggregationOutput"); + } + + // Use AggregationOutput.newBuilder() to construct. + private AggregationOutput(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AggregationOutput() { + aggregationResults_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AggregationOutput.class, + com.google.cloud.aiplatform.v1.AggregationOutput.Builder.class); + } + + private int bitField0_; + public static final int DATASET_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.EvaluationDataset dataset_; + + /** + * + * + *
+   * The dataset used for evaluation & aggregation.
+   * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + * + * @return Whether the dataset field is set. + */ + @java.lang.Override + public boolean hasDataset() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The dataset used for evaluation & aggregation.
+   * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + * + * @return The dataset. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationDataset getDataset() { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.EvaluationDataset.getDefaultInstance() + : dataset_; + } + + /** + * + * + *
+   * The dataset used for evaluation & aggregation.
+   * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationDatasetOrBuilder getDatasetOrBuilder() { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.EvaluationDataset.getDefaultInstance() + : dataset_; + } + + public static final int AGGREGATION_RESULTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List aggregationResults_; + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + @java.lang.Override + public java.util.List + getAggregationResultsList() { + return aggregationResults_; + } + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + @java.lang.Override + public java.util.List + getAggregationResultsOrBuilderList() { + return aggregationResults_; + } + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + @java.lang.Override + public int getAggregationResultsCount() { + return aggregationResults_.size(); + } + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationResult getAggregationResults(int index) { + return aggregationResults_.get(index); + } + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationResultOrBuilder getAggregationResultsOrBuilder( + int index) { + return aggregationResults_.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, getDataset()); + } + for (int i = 0; i < aggregationResults_.size(); i++) { + output.writeMessage(2, aggregationResults_.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, getDataset()); + } + for (int i = 0; i < aggregationResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, aggregationResults_.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.aiplatform.v1.AggregationOutput)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.AggregationOutput other = + (com.google.cloud.aiplatform.v1.AggregationOutput) obj; + + if (hasDataset() != other.hasDataset()) return false; + if (hasDataset()) { + if (!getDataset().equals(other.getDataset())) return false; + } + if (!getAggregationResultsList().equals(other.getAggregationResultsList())) 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 (hasDataset()) { + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + } + if (getAggregationResultsCount() > 0) { + hash = (37 * hash) + AGGREGATION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getAggregationResultsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.AggregationOutput 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 aggregation result for the entire dataset and all metrics.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AggregationOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.AggregationOutput) + com.google.cloud.aiplatform.v1.AggregationOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AggregationOutput.class, + com.google.cloud.aiplatform.v1.AggregationOutput.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.AggregationOutput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDatasetFieldBuilder(); + internalGetAggregationResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataset_ = null; + if (datasetBuilder_ != null) { + datasetBuilder_.dispose(); + datasetBuilder_ = null; + } + if (aggregationResultsBuilder_ == null) { + aggregationResults_ = java.util.Collections.emptyList(); + } else { + aggregationResults_ = null; + aggregationResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationOutput getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.AggregationOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationOutput build() { + com.google.cloud.aiplatform.v1.AggregationOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationOutput buildPartial() { + com.google.cloud.aiplatform.v1.AggregationOutput result = + new com.google.cloud.aiplatform.v1.AggregationOutput(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.AggregationOutput result) { + if (aggregationResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + aggregationResults_ = java.util.Collections.unmodifiableList(aggregationResults_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.aggregationResults_ = aggregationResults_; + } else { + result.aggregationResults_ = aggregationResultsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.AggregationOutput result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataset_ = datasetBuilder_ == null ? dataset_ : datasetBuilder_.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.aiplatform.v1.AggregationOutput) { + return mergeFrom((com.google.cloud.aiplatform.v1.AggregationOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.AggregationOutput other) { + if (other == com.google.cloud.aiplatform.v1.AggregationOutput.getDefaultInstance()) + return this; + if (other.hasDataset()) { + mergeDataset(other.getDataset()); + } + if (aggregationResultsBuilder_ == null) { + if (!other.aggregationResults_.isEmpty()) { + if (aggregationResults_.isEmpty()) { + aggregationResults_ = other.aggregationResults_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAggregationResultsIsMutable(); + aggregationResults_.addAll(other.aggregationResults_); + } + onChanged(); + } + } else { + if (!other.aggregationResults_.isEmpty()) { + if (aggregationResultsBuilder_.isEmpty()) { + aggregationResultsBuilder_.dispose(); + aggregationResultsBuilder_ = null; + aggregationResults_ = other.aggregationResults_; + bitField0_ = (bitField0_ & ~0x00000002); + aggregationResultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAggregationResultsFieldBuilder() + : null; + } else { + aggregationResultsBuilder_.addAllMessages(other.aggregationResults_); + } + } + } + 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(internalGetDatasetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.aiplatform.v1.AggregationResult m = + input.readMessage( + com.google.cloud.aiplatform.v1.AggregationResult.parser(), + extensionRegistry); + if (aggregationResultsBuilder_ == null) { + ensureAggregationResultsIsMutable(); + aggregationResults_.add(m); + } else { + aggregationResultsBuilder_.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 com.google.cloud.aiplatform.v1.EvaluationDataset dataset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluationDataset, + com.google.cloud.aiplatform.v1.EvaluationDataset.Builder, + com.google.cloud.aiplatform.v1.EvaluationDatasetOrBuilder> + datasetBuilder_; + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + * + * @return Whether the dataset field is set. + */ + public boolean hasDataset() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + * + * @return The dataset. + */ + public com.google.cloud.aiplatform.v1.EvaluationDataset getDataset() { + if (datasetBuilder_ == null) { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.EvaluationDataset.getDefaultInstance() + : dataset_; + } else { + return datasetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + public Builder setDataset(com.google.cloud.aiplatform.v1.EvaluationDataset value) { + if (datasetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + } else { + datasetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + public Builder setDataset( + com.google.cloud.aiplatform.v1.EvaluationDataset.Builder builderForValue) { + if (datasetBuilder_ == null) { + dataset_ = builderForValue.build(); + } else { + datasetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + public Builder mergeDataset(com.google.cloud.aiplatform.v1.EvaluationDataset value) { + if (datasetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && dataset_ != null + && dataset_ != com.google.cloud.aiplatform.v1.EvaluationDataset.getDefaultInstance()) { + getDatasetBuilder().mergeFrom(value); + } else { + dataset_ = value; + } + } else { + datasetBuilder_.mergeFrom(value); + } + if (dataset_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + public Builder clearDataset() { + bitField0_ = (bitField0_ & ~0x00000001); + dataset_ = null; + if (datasetBuilder_ != null) { + datasetBuilder_.dispose(); + datasetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + public com.google.cloud.aiplatform.v1.EvaluationDataset.Builder getDatasetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDatasetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + public com.google.cloud.aiplatform.v1.EvaluationDatasetOrBuilder getDatasetOrBuilder() { + if (datasetBuilder_ != null) { + return datasetBuilder_.getMessageOrBuilder(); + } else { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.EvaluationDataset.getDefaultInstance() + : dataset_; + } + } + + /** + * + * + *
+     * The dataset used for evaluation & aggregation.
+     * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluationDataset, + com.google.cloud.aiplatform.v1.EvaluationDataset.Builder, + com.google.cloud.aiplatform.v1.EvaluationDatasetOrBuilder> + internalGetDatasetFieldBuilder() { + if (datasetBuilder_ == null) { + datasetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluationDataset, + com.google.cloud.aiplatform.v1.EvaluationDataset.Builder, + com.google.cloud.aiplatform.v1.EvaluationDatasetOrBuilder>( + getDataset(), getParentForChildren(), isClean()); + dataset_ = null; + } + return datasetBuilder_; + } + + private java.util.List aggregationResults_ = + java.util.Collections.emptyList(); + + private void ensureAggregationResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + aggregationResults_ = + new java.util.ArrayList( + aggregationResults_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.AggregationResult, + com.google.cloud.aiplatform.v1.AggregationResult.Builder, + com.google.cloud.aiplatform.v1.AggregationResultOrBuilder> + aggregationResultsBuilder_; + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public java.util.List + getAggregationResultsList() { + if (aggregationResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(aggregationResults_); + } else { + return aggregationResultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public int getAggregationResultsCount() { + if (aggregationResultsBuilder_ == null) { + return aggregationResults_.size(); + } else { + return aggregationResultsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public com.google.cloud.aiplatform.v1.AggregationResult getAggregationResults(int index) { + if (aggregationResultsBuilder_ == null) { + return aggregationResults_.get(index); + } else { + return aggregationResultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder setAggregationResults( + int index, com.google.cloud.aiplatform.v1.AggregationResult value) { + if (aggregationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregationResultsIsMutable(); + aggregationResults_.set(index, value); + onChanged(); + } else { + aggregationResultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder setAggregationResults( + int index, com.google.cloud.aiplatform.v1.AggregationResult.Builder builderForValue) { + if (aggregationResultsBuilder_ == null) { + ensureAggregationResultsIsMutable(); + aggregationResults_.set(index, builderForValue.build()); + onChanged(); + } else { + aggregationResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder addAggregationResults(com.google.cloud.aiplatform.v1.AggregationResult value) { + if (aggregationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregationResultsIsMutable(); + aggregationResults_.add(value); + onChanged(); + } else { + aggregationResultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder addAggregationResults( + int index, com.google.cloud.aiplatform.v1.AggregationResult value) { + if (aggregationResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregationResultsIsMutable(); + aggregationResults_.add(index, value); + onChanged(); + } else { + aggregationResultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder addAggregationResults( + com.google.cloud.aiplatform.v1.AggregationResult.Builder builderForValue) { + if (aggregationResultsBuilder_ == null) { + ensureAggregationResultsIsMutable(); + aggregationResults_.add(builderForValue.build()); + onChanged(); + } else { + aggregationResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder addAggregationResults( + int index, com.google.cloud.aiplatform.v1.AggregationResult.Builder builderForValue) { + if (aggregationResultsBuilder_ == null) { + ensureAggregationResultsIsMutable(); + aggregationResults_.add(index, builderForValue.build()); + onChanged(); + } else { + aggregationResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder addAllAggregationResults( + java.lang.Iterable values) { + if (aggregationResultsBuilder_ == null) { + ensureAggregationResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aggregationResults_); + onChanged(); + } else { + aggregationResultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder clearAggregationResults() { + if (aggregationResultsBuilder_ == null) { + aggregationResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + aggregationResultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public Builder removeAggregationResults(int index) { + if (aggregationResultsBuilder_ == null) { + ensureAggregationResultsIsMutable(); + aggregationResults_.remove(index); + onChanged(); + } else { + aggregationResultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public com.google.cloud.aiplatform.v1.AggregationResult.Builder getAggregationResultsBuilder( + int index) { + return internalGetAggregationResultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public com.google.cloud.aiplatform.v1.AggregationResultOrBuilder getAggregationResultsOrBuilder( + int index) { + if (aggregationResultsBuilder_ == null) { + return aggregationResults_.get(index); + } else { + return aggregationResultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public java.util.List + getAggregationResultsOrBuilderList() { + if (aggregationResultsBuilder_ != null) { + return aggregationResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aggregationResults_); + } + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public com.google.cloud.aiplatform.v1.AggregationResult.Builder addAggregationResultsBuilder() { + return internalGetAggregationResultsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.AggregationResult.getDefaultInstance()); + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public com.google.cloud.aiplatform.v1.AggregationResult.Builder addAggregationResultsBuilder( + int index) { + return internalGetAggregationResultsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.AggregationResult.getDefaultInstance()); + } + + /** + * + * + *
+     * One AggregationResult per metric.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + public java.util.List + getAggregationResultsBuilderList() { + return internalGetAggregationResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.AggregationResult, + com.google.cloud.aiplatform.v1.AggregationResult.Builder, + com.google.cloud.aiplatform.v1.AggregationResultOrBuilder> + internalGetAggregationResultsFieldBuilder() { + if (aggregationResultsBuilder_ == null) { + aggregationResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.AggregationResult, + com.google.cloud.aiplatform.v1.AggregationResult.Builder, + com.google.cloud.aiplatform.v1.AggregationResultOrBuilder>( + aggregationResults_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + aggregationResults_ = null; + } + return aggregationResultsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.AggregationOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.AggregationOutput) + private static final com.google.cloud.aiplatform.v1.AggregationOutput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.AggregationOutput(); + } + + public static com.google.cloud.aiplatform.v1.AggregationOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregationOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.AggregationOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationOutputOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationOutputOrBuilder.java new file mode 100644 index 000000000000..6ebb7e05fb72 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationOutputOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface AggregationOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.AggregationOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The dataset used for evaluation & aggregation.
+   * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + * + * @return Whether the dataset field is set. + */ + boolean hasDataset(); + + /** + * + * + *
+   * The dataset used for evaluation & aggregation.
+   * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + * + * @return The dataset. + */ + com.google.cloud.aiplatform.v1.EvaluationDataset getDataset(); + + /** + * + * + *
+   * The dataset used for evaluation & aggregation.
+   * 
+ * + * .google.cloud.aiplatform.v1.EvaluationDataset dataset = 1; + */ + com.google.cloud.aiplatform.v1.EvaluationDatasetOrBuilder getDatasetOrBuilder(); + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + java.util.List getAggregationResultsList(); + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + com.google.cloud.aiplatform.v1.AggregationResult getAggregationResults(int index); + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + int getAggregationResultsCount(); + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + java.util.List + getAggregationResultsOrBuilderList(); + + /** + * + * + *
+   * One AggregationResult per metric.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.AggregationResult aggregation_results = 2; + */ + com.google.cloud.aiplatform.v1.AggregationResultOrBuilder getAggregationResultsOrBuilder( + int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationResult.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationResult.java new file mode 100644 index 000000000000..dc394d3b57ef --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationResult.java @@ -0,0 +1,2218 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The aggregation result for a single metric.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AggregationResult} + */ +@com.google.protobuf.Generated +public final class AggregationResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.AggregationResult) + AggregationResultOrBuilder { + 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= */ "", + "AggregationResult"); + } + + // Use AggregationResult.newBuilder() to construct. + private AggregationResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AggregationResult() { + aggregationMetric_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AggregationResult.class, + com.google.cloud.aiplatform.v1.AggregationResult.Builder.class); + } + + private int aggregationResultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object aggregationResult_; + + public enum AggregationResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + POINTWISE_METRIC_RESULT(5), + PAIRWISE_METRIC_RESULT(6), + EXACT_MATCH_METRIC_VALUE(7), + BLEU_METRIC_VALUE(8), + ROUGE_METRIC_VALUE(9), + AGGREGATIONRESULT_NOT_SET(0); + private final int value; + + private AggregationResultCase(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 AggregationResultCase valueOf(int value) { + return forNumber(value); + } + + public static AggregationResultCase forNumber(int value) { + switch (value) { + case 5: + return POINTWISE_METRIC_RESULT; + case 6: + return PAIRWISE_METRIC_RESULT; + case 7: + return EXACT_MATCH_METRIC_VALUE; + case 8: + return BLEU_METRIC_VALUE; + case 9: + return ROUGE_METRIC_VALUE; + case 0: + return AGGREGATIONRESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AggregationResultCase getAggregationResultCase() { + return AggregationResultCase.forNumber(aggregationResultCase_); + } + + public static final int POINTWISE_METRIC_RESULT_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Result for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + * + * @return Whether the pointwiseMetricResult field is set. + */ + @java.lang.Override + public boolean hasPointwiseMetricResult() { + return aggregationResultCase_ == 5; + } + + /** + * + * + *
+   * Result for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + * + * @return The pointwiseMetricResult. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PointwiseMetricResult getPointwiseMetricResult() { + if (aggregationResultCase_ == 5) { + return (com.google.cloud.aiplatform.v1.PointwiseMetricResult) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.PointwiseMetricResult.getDefaultInstance(); + } + + /** + * + * + *
+   * Result for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PointwiseMetricResultOrBuilder + getPointwiseMetricResultOrBuilder() { + if (aggregationResultCase_ == 5) { + return (com.google.cloud.aiplatform.v1.PointwiseMetricResult) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.PointwiseMetricResult.getDefaultInstance(); + } + + public static final int PAIRWISE_METRIC_RESULT_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Result for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + * + * @return Whether the pairwiseMetricResult field is set. + */ + @java.lang.Override + public boolean hasPairwiseMetricResult() { + return aggregationResultCase_ == 6; + } + + /** + * + * + *
+   * Result for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + * + * @return The pairwiseMetricResult. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PairwiseMetricResult getPairwiseMetricResult() { + if (aggregationResultCase_ == 6) { + return (com.google.cloud.aiplatform.v1.PairwiseMetricResult) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.PairwiseMetricResult.getDefaultInstance(); + } + + /** + * + * + *
+   * Result for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PairwiseMetricResultOrBuilder + getPairwiseMetricResultOrBuilder() { + if (aggregationResultCase_ == 6) { + return (com.google.cloud.aiplatform.v1.PairwiseMetricResult) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.PairwiseMetricResult.getDefaultInstance(); + } + + public static final int EXACT_MATCH_METRIC_VALUE_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Results for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + * + * @return Whether the exactMatchMetricValue field is set. + */ + @java.lang.Override + public boolean hasExactMatchMetricValue() { + return aggregationResultCase_ == 7; + } + + /** + * + * + *
+   * Results for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + * + * @return The exactMatchMetricValue. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExactMatchMetricValue getExactMatchMetricValue() { + if (aggregationResultCase_ == 7) { + return (com.google.cloud.aiplatform.v1.ExactMatchMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.ExactMatchMetricValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Results for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExactMatchMetricValueOrBuilder + getExactMatchMetricValueOrBuilder() { + if (aggregationResultCase_ == 7) { + return (com.google.cloud.aiplatform.v1.ExactMatchMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.ExactMatchMetricValue.getDefaultInstance(); + } + + public static final int BLEU_METRIC_VALUE_FIELD_NUMBER = 8; + + /** + * + * + *
+   * Results for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + * + * @return Whether the bleuMetricValue field is set. + */ + @java.lang.Override + public boolean hasBleuMetricValue() { + return aggregationResultCase_ == 8; + } + + /** + * + * + *
+   * Results for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + * + * @return The bleuMetricValue. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BleuMetricValue getBleuMetricValue() { + if (aggregationResultCase_ == 8) { + return (com.google.cloud.aiplatform.v1.BleuMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.BleuMetricValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Results for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BleuMetricValueOrBuilder getBleuMetricValueOrBuilder() { + if (aggregationResultCase_ == 8) { + return (com.google.cloud.aiplatform.v1.BleuMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.BleuMetricValue.getDefaultInstance(); + } + + public static final int ROUGE_METRIC_VALUE_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Results for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + * + * @return Whether the rougeMetricValue field is set. + */ + @java.lang.Override + public boolean hasRougeMetricValue() { + return aggregationResultCase_ == 9; + } + + /** + * + * + *
+   * Results for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + * + * @return The rougeMetricValue. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RougeMetricValue getRougeMetricValue() { + if (aggregationResultCase_ == 9) { + return (com.google.cloud.aiplatform.v1.RougeMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.RougeMetricValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Results for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RougeMetricValueOrBuilder getRougeMetricValueOrBuilder() { + if (aggregationResultCase_ == 9) { + return (com.google.cloud.aiplatform.v1.RougeMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.RougeMetricValue.getDefaultInstance(); + } + + public static final int AGGREGATION_METRIC_FIELD_NUMBER = 4; + private int aggregationMetric_ = 0; + + /** + * + * + *
+   * Aggregation metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @return The enum numeric value on the wire for aggregationMetric. + */ + @java.lang.Override + public int getAggregationMetricValue() { + return aggregationMetric_; + } + + /** + * + * + *
+   * Aggregation metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @return The aggregationMetric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Metric.AggregationMetric getAggregationMetric() { + com.google.cloud.aiplatform.v1.Metric.AggregationMetric result = + com.google.cloud.aiplatform.v1.Metric.AggregationMetric.forNumber(aggregationMetric_); + return result == null + ? com.google.cloud.aiplatform.v1.Metric.AggregationMetric.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 (aggregationMetric_ + != com.google.cloud.aiplatform.v1.Metric.AggregationMetric.AGGREGATION_METRIC_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, aggregationMetric_); + } + if (aggregationResultCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.aiplatform.v1.PointwiseMetricResult) aggregationResult_); + } + if (aggregationResultCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.aiplatform.v1.PairwiseMetricResult) aggregationResult_); + } + if (aggregationResultCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.aiplatform.v1.ExactMatchMetricValue) aggregationResult_); + } + if (aggregationResultCase_ == 8) { + output.writeMessage(8, (com.google.cloud.aiplatform.v1.BleuMetricValue) aggregationResult_); + } + if (aggregationResultCase_ == 9) { + output.writeMessage(9, (com.google.cloud.aiplatform.v1.RougeMetricValue) aggregationResult_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (aggregationMetric_ + != com.google.cloud.aiplatform.v1.Metric.AggregationMetric.AGGREGATION_METRIC_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, aggregationMetric_); + } + if (aggregationResultCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.aiplatform.v1.PointwiseMetricResult) aggregationResult_); + } + if (aggregationResultCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.aiplatform.v1.PairwiseMetricResult) aggregationResult_); + } + if (aggregationResultCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.aiplatform.v1.ExactMatchMetricValue) aggregationResult_); + } + if (aggregationResultCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.aiplatform.v1.BleuMetricValue) aggregationResult_); + } + if (aggregationResultCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.aiplatform.v1.RougeMetricValue) aggregationResult_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.AggregationResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.AggregationResult other = + (com.google.cloud.aiplatform.v1.AggregationResult) obj; + + if (aggregationMetric_ != other.aggregationMetric_) return false; + if (!getAggregationResultCase().equals(other.getAggregationResultCase())) return false; + switch (aggregationResultCase_) { + case 5: + if (!getPointwiseMetricResult().equals(other.getPointwiseMetricResult())) return false; + break; + case 6: + if (!getPairwiseMetricResult().equals(other.getPairwiseMetricResult())) return false; + break; + case 7: + if (!getExactMatchMetricValue().equals(other.getExactMatchMetricValue())) return false; + break; + case 8: + if (!getBleuMetricValue().equals(other.getBleuMetricValue())) return false; + break; + case 9: + if (!getRougeMetricValue().equals(other.getRougeMetricValue())) 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) + AGGREGATION_METRIC_FIELD_NUMBER; + hash = (53 * hash) + aggregationMetric_; + switch (aggregationResultCase_) { + case 5: + hash = (37 * hash) + POINTWISE_METRIC_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getPointwiseMetricResult().hashCode(); + break; + case 6: + hash = (37 * hash) + PAIRWISE_METRIC_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getPairwiseMetricResult().hashCode(); + break; + case 7: + hash = (37 * hash) + EXACT_MATCH_METRIC_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getExactMatchMetricValue().hashCode(); + break; + case 8: + hash = (37 * hash) + BLEU_METRIC_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getBleuMetricValue().hashCode(); + break; + case 9: + hash = (37 * hash) + ROUGE_METRIC_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getRougeMetricValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.AggregationResult 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 aggregation result for a single metric.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AggregationResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.AggregationResult) + com.google.cloud.aiplatform.v1.AggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AggregationResult.class, + com.google.cloud.aiplatform.v1.AggregationResult.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.AggregationResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (pointwiseMetricResultBuilder_ != null) { + pointwiseMetricResultBuilder_.clear(); + } + if (pairwiseMetricResultBuilder_ != null) { + pairwiseMetricResultBuilder_.clear(); + } + if (exactMatchMetricValueBuilder_ != null) { + exactMatchMetricValueBuilder_.clear(); + } + if (bleuMetricValueBuilder_ != null) { + bleuMetricValueBuilder_.clear(); + } + if (rougeMetricValueBuilder_ != null) { + rougeMetricValueBuilder_.clear(); + } + aggregationMetric_ = 0; + aggregationResultCase_ = 0; + aggregationResult_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AggregationResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationResult getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.AggregationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationResult build() { + com.google.cloud.aiplatform.v1.AggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationResult buildPartial() { + com.google.cloud.aiplatform.v1.AggregationResult result = + new com.google.cloud.aiplatform.v1.AggregationResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.AggregationResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.aggregationMetric_ = aggregationMetric_; + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.AggregationResult result) { + result.aggregationResultCase_ = aggregationResultCase_; + result.aggregationResult_ = this.aggregationResult_; + if (aggregationResultCase_ == 5 && pointwiseMetricResultBuilder_ != null) { + result.aggregationResult_ = pointwiseMetricResultBuilder_.build(); + } + if (aggregationResultCase_ == 6 && pairwiseMetricResultBuilder_ != null) { + result.aggregationResult_ = pairwiseMetricResultBuilder_.build(); + } + if (aggregationResultCase_ == 7 && exactMatchMetricValueBuilder_ != null) { + result.aggregationResult_ = exactMatchMetricValueBuilder_.build(); + } + if (aggregationResultCase_ == 8 && bleuMetricValueBuilder_ != null) { + result.aggregationResult_ = bleuMetricValueBuilder_.build(); + } + if (aggregationResultCase_ == 9 && rougeMetricValueBuilder_ != null) { + result.aggregationResult_ = rougeMetricValueBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.AggregationResult) { + return mergeFrom((com.google.cloud.aiplatform.v1.AggregationResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.AggregationResult other) { + if (other == com.google.cloud.aiplatform.v1.AggregationResult.getDefaultInstance()) + return this; + if (other.aggregationMetric_ != 0) { + setAggregationMetricValue(other.getAggregationMetricValue()); + } + switch (other.getAggregationResultCase()) { + case POINTWISE_METRIC_RESULT: + { + mergePointwiseMetricResult(other.getPointwiseMetricResult()); + break; + } + case PAIRWISE_METRIC_RESULT: + { + mergePairwiseMetricResult(other.getPairwiseMetricResult()); + break; + } + case EXACT_MATCH_METRIC_VALUE: + { + mergeExactMatchMetricValue(other.getExactMatchMetricValue()); + break; + } + case BLEU_METRIC_VALUE: + { + mergeBleuMetricValue(other.getBleuMetricValue()); + break; + } + case ROUGE_METRIC_VALUE: + { + mergeRougeMetricValue(other.getRougeMetricValue()); + break; + } + case AGGREGATIONRESULT_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 32: + { + aggregationMetric_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetPointwiseMetricResultFieldBuilder().getBuilder(), extensionRegistry); + aggregationResultCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetPairwiseMetricResultFieldBuilder().getBuilder(), extensionRegistry); + aggregationResultCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetExactMatchMetricValueFieldBuilder().getBuilder(), extensionRegistry); + aggregationResultCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetBleuMetricValueFieldBuilder().getBuilder(), extensionRegistry); + aggregationResultCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetRougeMetricValueFieldBuilder().getBuilder(), extensionRegistry); + aggregationResultCase_ = 9; + 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 aggregationResultCase_ = 0; + private java.lang.Object aggregationResult_; + + public AggregationResultCase getAggregationResultCase() { + return AggregationResultCase.forNumber(aggregationResultCase_); + } + + public Builder clearAggregationResult() { + aggregationResultCase_ = 0; + aggregationResult_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PointwiseMetricResult, + com.google.cloud.aiplatform.v1.PointwiseMetricResult.Builder, + com.google.cloud.aiplatform.v1.PointwiseMetricResultOrBuilder> + pointwiseMetricResultBuilder_; + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + * + * @return Whether the pointwiseMetricResult field is set. + */ + @java.lang.Override + public boolean hasPointwiseMetricResult() { + return aggregationResultCase_ == 5; + } + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + * + * @return The pointwiseMetricResult. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PointwiseMetricResult getPointwiseMetricResult() { + if (pointwiseMetricResultBuilder_ == null) { + if (aggregationResultCase_ == 5) { + return (com.google.cloud.aiplatform.v1.PointwiseMetricResult) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.PointwiseMetricResult.getDefaultInstance(); + } else { + if (aggregationResultCase_ == 5) { + return pointwiseMetricResultBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PointwiseMetricResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + public Builder setPointwiseMetricResult( + com.google.cloud.aiplatform.v1.PointwiseMetricResult value) { + if (pointwiseMetricResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationResult_ = value; + onChanged(); + } else { + pointwiseMetricResultBuilder_.setMessage(value); + } + aggregationResultCase_ = 5; + return this; + } + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + public Builder setPointwiseMetricResult( + com.google.cloud.aiplatform.v1.PointwiseMetricResult.Builder builderForValue) { + if (pointwiseMetricResultBuilder_ == null) { + aggregationResult_ = builderForValue.build(); + onChanged(); + } else { + pointwiseMetricResultBuilder_.setMessage(builderForValue.build()); + } + aggregationResultCase_ = 5; + return this; + } + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + public Builder mergePointwiseMetricResult( + com.google.cloud.aiplatform.v1.PointwiseMetricResult value) { + if (pointwiseMetricResultBuilder_ == null) { + if (aggregationResultCase_ == 5 + && aggregationResult_ + != com.google.cloud.aiplatform.v1.PointwiseMetricResult.getDefaultInstance()) { + aggregationResult_ = + com.google.cloud.aiplatform.v1.PointwiseMetricResult.newBuilder( + (com.google.cloud.aiplatform.v1.PointwiseMetricResult) aggregationResult_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationResult_ = value; + } + onChanged(); + } else { + if (aggregationResultCase_ == 5) { + pointwiseMetricResultBuilder_.mergeFrom(value); + } else { + pointwiseMetricResultBuilder_.setMessage(value); + } + } + aggregationResultCase_ = 5; + return this; + } + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + public Builder clearPointwiseMetricResult() { + if (pointwiseMetricResultBuilder_ == null) { + if (aggregationResultCase_ == 5) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + onChanged(); + } + } else { + if (aggregationResultCase_ == 5) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + } + pointwiseMetricResultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + public com.google.cloud.aiplatform.v1.PointwiseMetricResult.Builder + getPointwiseMetricResultBuilder() { + return internalGetPointwiseMetricResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PointwiseMetricResultOrBuilder + getPointwiseMetricResultOrBuilder() { + if ((aggregationResultCase_ == 5) && (pointwiseMetricResultBuilder_ != null)) { + return pointwiseMetricResultBuilder_.getMessageOrBuilder(); + } else { + if (aggregationResultCase_ == 5) { + return (com.google.cloud.aiplatform.v1.PointwiseMetricResult) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.PointwiseMetricResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Result for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PointwiseMetricResult, + com.google.cloud.aiplatform.v1.PointwiseMetricResult.Builder, + com.google.cloud.aiplatform.v1.PointwiseMetricResultOrBuilder> + internalGetPointwiseMetricResultFieldBuilder() { + if (pointwiseMetricResultBuilder_ == null) { + if (!(aggregationResultCase_ == 5)) { + aggregationResult_ = + com.google.cloud.aiplatform.v1.PointwiseMetricResult.getDefaultInstance(); + } + pointwiseMetricResultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PointwiseMetricResult, + com.google.cloud.aiplatform.v1.PointwiseMetricResult.Builder, + com.google.cloud.aiplatform.v1.PointwiseMetricResultOrBuilder>( + (com.google.cloud.aiplatform.v1.PointwiseMetricResult) aggregationResult_, + getParentForChildren(), + isClean()); + aggregationResult_ = null; + } + aggregationResultCase_ = 5; + onChanged(); + return pointwiseMetricResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PairwiseMetricResult, + com.google.cloud.aiplatform.v1.PairwiseMetricResult.Builder, + com.google.cloud.aiplatform.v1.PairwiseMetricResultOrBuilder> + pairwiseMetricResultBuilder_; + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + * + * @return Whether the pairwiseMetricResult field is set. + */ + @java.lang.Override + public boolean hasPairwiseMetricResult() { + return aggregationResultCase_ == 6; + } + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + * + * @return The pairwiseMetricResult. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PairwiseMetricResult getPairwiseMetricResult() { + if (pairwiseMetricResultBuilder_ == null) { + if (aggregationResultCase_ == 6) { + return (com.google.cloud.aiplatform.v1.PairwiseMetricResult) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.PairwiseMetricResult.getDefaultInstance(); + } else { + if (aggregationResultCase_ == 6) { + return pairwiseMetricResultBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PairwiseMetricResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + public Builder setPairwiseMetricResult( + com.google.cloud.aiplatform.v1.PairwiseMetricResult value) { + if (pairwiseMetricResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationResult_ = value; + onChanged(); + } else { + pairwiseMetricResultBuilder_.setMessage(value); + } + aggregationResultCase_ = 6; + return this; + } + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + public Builder setPairwiseMetricResult( + com.google.cloud.aiplatform.v1.PairwiseMetricResult.Builder builderForValue) { + if (pairwiseMetricResultBuilder_ == null) { + aggregationResult_ = builderForValue.build(); + onChanged(); + } else { + pairwiseMetricResultBuilder_.setMessage(builderForValue.build()); + } + aggregationResultCase_ = 6; + return this; + } + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + public Builder mergePairwiseMetricResult( + com.google.cloud.aiplatform.v1.PairwiseMetricResult value) { + if (pairwiseMetricResultBuilder_ == null) { + if (aggregationResultCase_ == 6 + && aggregationResult_ + != com.google.cloud.aiplatform.v1.PairwiseMetricResult.getDefaultInstance()) { + aggregationResult_ = + com.google.cloud.aiplatform.v1.PairwiseMetricResult.newBuilder( + (com.google.cloud.aiplatform.v1.PairwiseMetricResult) aggregationResult_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationResult_ = value; + } + onChanged(); + } else { + if (aggregationResultCase_ == 6) { + pairwiseMetricResultBuilder_.mergeFrom(value); + } else { + pairwiseMetricResultBuilder_.setMessage(value); + } + } + aggregationResultCase_ = 6; + return this; + } + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + public Builder clearPairwiseMetricResult() { + if (pairwiseMetricResultBuilder_ == null) { + if (aggregationResultCase_ == 6) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + onChanged(); + } + } else { + if (aggregationResultCase_ == 6) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + } + pairwiseMetricResultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + public com.google.cloud.aiplatform.v1.PairwiseMetricResult.Builder + getPairwiseMetricResultBuilder() { + return internalGetPairwiseMetricResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PairwiseMetricResultOrBuilder + getPairwiseMetricResultOrBuilder() { + if ((aggregationResultCase_ == 6) && (pairwiseMetricResultBuilder_ != null)) { + return pairwiseMetricResultBuilder_.getMessageOrBuilder(); + } else { + if (aggregationResultCase_ == 6) { + return (com.google.cloud.aiplatform.v1.PairwiseMetricResult) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.PairwiseMetricResult.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Result for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PairwiseMetricResult, + com.google.cloud.aiplatform.v1.PairwiseMetricResult.Builder, + com.google.cloud.aiplatform.v1.PairwiseMetricResultOrBuilder> + internalGetPairwiseMetricResultFieldBuilder() { + if (pairwiseMetricResultBuilder_ == null) { + if (!(aggregationResultCase_ == 6)) { + aggregationResult_ = + com.google.cloud.aiplatform.v1.PairwiseMetricResult.getDefaultInstance(); + } + pairwiseMetricResultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PairwiseMetricResult, + com.google.cloud.aiplatform.v1.PairwiseMetricResult.Builder, + com.google.cloud.aiplatform.v1.PairwiseMetricResultOrBuilder>( + (com.google.cloud.aiplatform.v1.PairwiseMetricResult) aggregationResult_, + getParentForChildren(), + isClean()); + aggregationResult_ = null; + } + aggregationResultCase_ = 6; + onChanged(); + return pairwiseMetricResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ExactMatchMetricValue, + com.google.cloud.aiplatform.v1.ExactMatchMetricValue.Builder, + com.google.cloud.aiplatform.v1.ExactMatchMetricValueOrBuilder> + exactMatchMetricValueBuilder_; + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + * + * @return Whether the exactMatchMetricValue field is set. + */ + @java.lang.Override + public boolean hasExactMatchMetricValue() { + return aggregationResultCase_ == 7; + } + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + * + * @return The exactMatchMetricValue. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExactMatchMetricValue getExactMatchMetricValue() { + if (exactMatchMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 7) { + return (com.google.cloud.aiplatform.v1.ExactMatchMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.ExactMatchMetricValue.getDefaultInstance(); + } else { + if (aggregationResultCase_ == 7) { + return exactMatchMetricValueBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.ExactMatchMetricValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + public Builder setExactMatchMetricValue( + com.google.cloud.aiplatform.v1.ExactMatchMetricValue value) { + if (exactMatchMetricValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationResult_ = value; + onChanged(); + } else { + exactMatchMetricValueBuilder_.setMessage(value); + } + aggregationResultCase_ = 7; + return this; + } + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + public Builder setExactMatchMetricValue( + com.google.cloud.aiplatform.v1.ExactMatchMetricValue.Builder builderForValue) { + if (exactMatchMetricValueBuilder_ == null) { + aggregationResult_ = builderForValue.build(); + onChanged(); + } else { + exactMatchMetricValueBuilder_.setMessage(builderForValue.build()); + } + aggregationResultCase_ = 7; + return this; + } + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + public Builder mergeExactMatchMetricValue( + com.google.cloud.aiplatform.v1.ExactMatchMetricValue value) { + if (exactMatchMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 7 + && aggregationResult_ + != com.google.cloud.aiplatform.v1.ExactMatchMetricValue.getDefaultInstance()) { + aggregationResult_ = + com.google.cloud.aiplatform.v1.ExactMatchMetricValue.newBuilder( + (com.google.cloud.aiplatform.v1.ExactMatchMetricValue) aggregationResult_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationResult_ = value; + } + onChanged(); + } else { + if (aggregationResultCase_ == 7) { + exactMatchMetricValueBuilder_.mergeFrom(value); + } else { + exactMatchMetricValueBuilder_.setMessage(value); + } + } + aggregationResultCase_ = 7; + return this; + } + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + public Builder clearExactMatchMetricValue() { + if (exactMatchMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 7) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + onChanged(); + } + } else { + if (aggregationResultCase_ == 7) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + } + exactMatchMetricValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + public com.google.cloud.aiplatform.v1.ExactMatchMetricValue.Builder + getExactMatchMetricValueBuilder() { + return internalGetExactMatchMetricValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExactMatchMetricValueOrBuilder + getExactMatchMetricValueOrBuilder() { + if ((aggregationResultCase_ == 7) && (exactMatchMetricValueBuilder_ != null)) { + return exactMatchMetricValueBuilder_.getMessageOrBuilder(); + } else { + if (aggregationResultCase_ == 7) { + return (com.google.cloud.aiplatform.v1.ExactMatchMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.ExactMatchMetricValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Results for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ExactMatchMetricValue, + com.google.cloud.aiplatform.v1.ExactMatchMetricValue.Builder, + com.google.cloud.aiplatform.v1.ExactMatchMetricValueOrBuilder> + internalGetExactMatchMetricValueFieldBuilder() { + if (exactMatchMetricValueBuilder_ == null) { + if (!(aggregationResultCase_ == 7)) { + aggregationResult_ = + com.google.cloud.aiplatform.v1.ExactMatchMetricValue.getDefaultInstance(); + } + exactMatchMetricValueBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ExactMatchMetricValue, + com.google.cloud.aiplatform.v1.ExactMatchMetricValue.Builder, + com.google.cloud.aiplatform.v1.ExactMatchMetricValueOrBuilder>( + (com.google.cloud.aiplatform.v1.ExactMatchMetricValue) aggregationResult_, + getParentForChildren(), + isClean()); + aggregationResult_ = null; + } + aggregationResultCase_ = 7; + onChanged(); + return exactMatchMetricValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BleuMetricValue, + com.google.cloud.aiplatform.v1.BleuMetricValue.Builder, + com.google.cloud.aiplatform.v1.BleuMetricValueOrBuilder> + bleuMetricValueBuilder_; + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + * + * @return Whether the bleuMetricValue field is set. + */ + @java.lang.Override + public boolean hasBleuMetricValue() { + return aggregationResultCase_ == 8; + } + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + * + * @return The bleuMetricValue. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BleuMetricValue getBleuMetricValue() { + if (bleuMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 8) { + return (com.google.cloud.aiplatform.v1.BleuMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.BleuMetricValue.getDefaultInstance(); + } else { + if (aggregationResultCase_ == 8) { + return bleuMetricValueBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.BleuMetricValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + public Builder setBleuMetricValue(com.google.cloud.aiplatform.v1.BleuMetricValue value) { + if (bleuMetricValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationResult_ = value; + onChanged(); + } else { + bleuMetricValueBuilder_.setMessage(value); + } + aggregationResultCase_ = 8; + return this; + } + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + public Builder setBleuMetricValue( + com.google.cloud.aiplatform.v1.BleuMetricValue.Builder builderForValue) { + if (bleuMetricValueBuilder_ == null) { + aggregationResult_ = builderForValue.build(); + onChanged(); + } else { + bleuMetricValueBuilder_.setMessage(builderForValue.build()); + } + aggregationResultCase_ = 8; + return this; + } + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + public Builder mergeBleuMetricValue(com.google.cloud.aiplatform.v1.BleuMetricValue value) { + if (bleuMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 8 + && aggregationResult_ + != com.google.cloud.aiplatform.v1.BleuMetricValue.getDefaultInstance()) { + aggregationResult_ = + com.google.cloud.aiplatform.v1.BleuMetricValue.newBuilder( + (com.google.cloud.aiplatform.v1.BleuMetricValue) aggregationResult_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationResult_ = value; + } + onChanged(); + } else { + if (aggregationResultCase_ == 8) { + bleuMetricValueBuilder_.mergeFrom(value); + } else { + bleuMetricValueBuilder_.setMessage(value); + } + } + aggregationResultCase_ = 8; + return this; + } + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + public Builder clearBleuMetricValue() { + if (bleuMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 8) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + onChanged(); + } + } else { + if (aggregationResultCase_ == 8) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + } + bleuMetricValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + public com.google.cloud.aiplatform.v1.BleuMetricValue.Builder getBleuMetricValueBuilder() { + return internalGetBleuMetricValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BleuMetricValueOrBuilder getBleuMetricValueOrBuilder() { + if ((aggregationResultCase_ == 8) && (bleuMetricValueBuilder_ != null)) { + return bleuMetricValueBuilder_.getMessageOrBuilder(); + } else { + if (aggregationResultCase_ == 8) { + return (com.google.cloud.aiplatform.v1.BleuMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.BleuMetricValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Results for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BleuMetricValue, + com.google.cloud.aiplatform.v1.BleuMetricValue.Builder, + com.google.cloud.aiplatform.v1.BleuMetricValueOrBuilder> + internalGetBleuMetricValueFieldBuilder() { + if (bleuMetricValueBuilder_ == null) { + if (!(aggregationResultCase_ == 8)) { + aggregationResult_ = com.google.cloud.aiplatform.v1.BleuMetricValue.getDefaultInstance(); + } + bleuMetricValueBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BleuMetricValue, + com.google.cloud.aiplatform.v1.BleuMetricValue.Builder, + com.google.cloud.aiplatform.v1.BleuMetricValueOrBuilder>( + (com.google.cloud.aiplatform.v1.BleuMetricValue) aggregationResult_, + getParentForChildren(), + isClean()); + aggregationResult_ = null; + } + aggregationResultCase_ = 8; + onChanged(); + return bleuMetricValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RougeMetricValue, + com.google.cloud.aiplatform.v1.RougeMetricValue.Builder, + com.google.cloud.aiplatform.v1.RougeMetricValueOrBuilder> + rougeMetricValueBuilder_; + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + * + * @return Whether the rougeMetricValue field is set. + */ + @java.lang.Override + public boolean hasRougeMetricValue() { + return aggregationResultCase_ == 9; + } + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + * + * @return The rougeMetricValue. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RougeMetricValue getRougeMetricValue() { + if (rougeMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 9) { + return (com.google.cloud.aiplatform.v1.RougeMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.RougeMetricValue.getDefaultInstance(); + } else { + if (aggregationResultCase_ == 9) { + return rougeMetricValueBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.RougeMetricValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + public Builder setRougeMetricValue(com.google.cloud.aiplatform.v1.RougeMetricValue value) { + if (rougeMetricValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationResult_ = value; + onChanged(); + } else { + rougeMetricValueBuilder_.setMessage(value); + } + aggregationResultCase_ = 9; + return this; + } + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + public Builder setRougeMetricValue( + com.google.cloud.aiplatform.v1.RougeMetricValue.Builder builderForValue) { + if (rougeMetricValueBuilder_ == null) { + aggregationResult_ = builderForValue.build(); + onChanged(); + } else { + rougeMetricValueBuilder_.setMessage(builderForValue.build()); + } + aggregationResultCase_ = 9; + return this; + } + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + public Builder mergeRougeMetricValue(com.google.cloud.aiplatform.v1.RougeMetricValue value) { + if (rougeMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 9 + && aggregationResult_ + != com.google.cloud.aiplatform.v1.RougeMetricValue.getDefaultInstance()) { + aggregationResult_ = + com.google.cloud.aiplatform.v1.RougeMetricValue.newBuilder( + (com.google.cloud.aiplatform.v1.RougeMetricValue) aggregationResult_) + .mergeFrom(value) + .buildPartial(); + } else { + aggregationResult_ = value; + } + onChanged(); + } else { + if (aggregationResultCase_ == 9) { + rougeMetricValueBuilder_.mergeFrom(value); + } else { + rougeMetricValueBuilder_.setMessage(value); + } + } + aggregationResultCase_ = 9; + return this; + } + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + public Builder clearRougeMetricValue() { + if (rougeMetricValueBuilder_ == null) { + if (aggregationResultCase_ == 9) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + onChanged(); + } + } else { + if (aggregationResultCase_ == 9) { + aggregationResultCase_ = 0; + aggregationResult_ = null; + } + rougeMetricValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + public com.google.cloud.aiplatform.v1.RougeMetricValue.Builder getRougeMetricValueBuilder() { + return internalGetRougeMetricValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RougeMetricValueOrBuilder getRougeMetricValueOrBuilder() { + if ((aggregationResultCase_ == 9) && (rougeMetricValueBuilder_ != null)) { + return rougeMetricValueBuilder_.getMessageOrBuilder(); + } else { + if (aggregationResultCase_ == 9) { + return (com.google.cloud.aiplatform.v1.RougeMetricValue) aggregationResult_; + } + return com.google.cloud.aiplatform.v1.RougeMetricValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Results for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RougeMetricValue, + com.google.cloud.aiplatform.v1.RougeMetricValue.Builder, + com.google.cloud.aiplatform.v1.RougeMetricValueOrBuilder> + internalGetRougeMetricValueFieldBuilder() { + if (rougeMetricValueBuilder_ == null) { + if (!(aggregationResultCase_ == 9)) { + aggregationResult_ = com.google.cloud.aiplatform.v1.RougeMetricValue.getDefaultInstance(); + } + rougeMetricValueBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RougeMetricValue, + com.google.cloud.aiplatform.v1.RougeMetricValue.Builder, + com.google.cloud.aiplatform.v1.RougeMetricValueOrBuilder>( + (com.google.cloud.aiplatform.v1.RougeMetricValue) aggregationResult_, + getParentForChildren(), + isClean()); + aggregationResult_ = null; + } + aggregationResultCase_ = 9; + onChanged(); + return rougeMetricValueBuilder_; + } + + private int aggregationMetric_ = 0; + + /** + * + * + *
+     * Aggregation metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @return The enum numeric value on the wire for aggregationMetric. + */ + @java.lang.Override + public int getAggregationMetricValue() { + return aggregationMetric_; + } + + /** + * + * + *
+     * Aggregation metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @param value The enum numeric value on the wire for aggregationMetric to set. + * @return This builder for chaining. + */ + public Builder setAggregationMetricValue(int value) { + aggregationMetric_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Aggregation metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @return The aggregationMetric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Metric.AggregationMetric getAggregationMetric() { + com.google.cloud.aiplatform.v1.Metric.AggregationMetric result = + com.google.cloud.aiplatform.v1.Metric.AggregationMetric.forNumber(aggregationMetric_); + return result == null + ? com.google.cloud.aiplatform.v1.Metric.AggregationMetric.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Aggregation metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @param value The aggregationMetric to set. + * @return This builder for chaining. + */ + public Builder setAggregationMetric( + com.google.cloud.aiplatform.v1.Metric.AggregationMetric value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + aggregationMetric_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Aggregation metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @return This builder for chaining. + */ + public Builder clearAggregationMetric() { + bitField0_ = (bitField0_ & ~0x00000020); + aggregationMetric_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.AggregationResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.AggregationResult) + private static final com.google.cloud.aiplatform.v1.AggregationResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.AggregationResult(); + } + + public static com.google.cloud.aiplatform.v1.AggregationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.AggregationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationResultOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationResultOrBuilder.java new file mode 100644 index 000000000000..2a28fbbe387c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AggregationResultOrBuilder.java @@ -0,0 +1,241 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface AggregationResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.AggregationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Result for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + * + * @return Whether the pointwiseMetricResult field is set. + */ + boolean hasPointwiseMetricResult(); + + /** + * + * + *
+   * Result for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + * + * @return The pointwiseMetricResult. + */ + com.google.cloud.aiplatform.v1.PointwiseMetricResult getPointwiseMetricResult(); + + /** + * + * + *
+   * Result for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 5; + */ + com.google.cloud.aiplatform.v1.PointwiseMetricResultOrBuilder getPointwiseMetricResultOrBuilder(); + + /** + * + * + *
+   * Result for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + * + * @return Whether the pairwiseMetricResult field is set. + */ + boolean hasPairwiseMetricResult(); + + /** + * + * + *
+   * Result for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + * + * @return The pairwiseMetricResult. + */ + com.google.cloud.aiplatform.v1.PairwiseMetricResult getPairwiseMetricResult(); + + /** + * + * + *
+   * Result for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 6; + */ + com.google.cloud.aiplatform.v1.PairwiseMetricResultOrBuilder getPairwiseMetricResultOrBuilder(); + + /** + * + * + *
+   * Results for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + * + * @return Whether the exactMatchMetricValue field is set. + */ + boolean hasExactMatchMetricValue(); + + /** + * + * + *
+   * Results for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + * + * @return The exactMatchMetricValue. + */ + com.google.cloud.aiplatform.v1.ExactMatchMetricValue getExactMatchMetricValue(); + + /** + * + * + *
+   * Results for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_value = 7; + */ + com.google.cloud.aiplatform.v1.ExactMatchMetricValueOrBuilder getExactMatchMetricValueOrBuilder(); + + /** + * + * + *
+   * Results for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + * + * @return Whether the bleuMetricValue field is set. + */ + boolean hasBleuMetricValue(); + + /** + * + * + *
+   * Results for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + * + * @return The bleuMetricValue. + */ + com.google.cloud.aiplatform.v1.BleuMetricValue getBleuMetricValue(); + + /** + * + * + *
+   * Results for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_value = 8; + */ + com.google.cloud.aiplatform.v1.BleuMetricValueOrBuilder getBleuMetricValueOrBuilder(); + + /** + * + * + *
+   * Results for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + * + * @return Whether the rougeMetricValue field is set. + */ + boolean hasRougeMetricValue(); + + /** + * + * + *
+   * Results for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + * + * @return The rougeMetricValue. + */ + com.google.cloud.aiplatform.v1.RougeMetricValue getRougeMetricValue(); + + /** + * + * + *
+   * Results for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_value = 9; + */ + com.google.cloud.aiplatform.v1.RougeMetricValueOrBuilder getRougeMetricValueOrBuilder(); + + /** + * + * + *
+   * Aggregation metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @return The enum numeric value on the wire for aggregationMetric. + */ + int getAggregationMetricValue(); + + /** + * + * + *
+   * Aggregation metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metric = 4; + * + * @return The aggregationMetric. + */ + com.google.cloud.aiplatform.v1.Metric.AggregationMetric getAggregationMetric(); + + com.google.cloud.aiplatform.v1.AggregationResult.AggregationResultCase getAggregationResultCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutoraterConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutoraterConfig.java new file mode 100644 index 000000000000..f702343fe6c4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutoraterConfig.java @@ -0,0 +1,1277 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The configs for autorater. This is applicable to both EvaluateInstances and
+ * EvaluateDataset.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AutoraterConfig} + */ +@com.google.protobuf.Generated +public final class AutoraterConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.AutoraterConfig) + AutoraterConfigOrBuilder { + 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= */ "", + "AutoraterConfig"); + } + + // Use AutoraterConfig.newBuilder() to construct. + private AutoraterConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AutoraterConfig() { + autoraterModel_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AutoraterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AutoraterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AutoraterConfig.class, + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder.class); + } + + private int bitField0_; + public static final int SAMPLING_COUNT_FIELD_NUMBER = 1; + private int samplingCount_ = 0; + + /** + * + * + *
+   * Optional. Number of samples for each instance in the dataset.
+   * If not specified, the default is 4. Minimum value is 1, maximum value
+   * is 32.
+   * 
+ * + * optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the samplingCount field is set. + */ + @java.lang.Override + public boolean hasSamplingCount() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Number of samples for each instance in the dataset.
+   * If not specified, the default is 4. Minimum value is 1, maximum value
+   * is 32.
+   * 
+ * + * optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingCount. + */ + @java.lang.Override + public int getSamplingCount() { + return samplingCount_; + } + + public static final int FLIP_ENABLED_FIELD_NUMBER = 2; + private boolean flipEnabled_ = false; + + /** + * + * + *
+   * Optional. Default is true. Whether to flip the candidate and baseline
+   * responses. This is only applicable to the pairwise metric. If enabled, also
+   * provide PairwiseMetricSpec.candidate_response_field_name and
+   * PairwiseMetricSpec.baseline_response_field_name. When rendering
+   * PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
+   * fields will be flipped for half of the samples to reduce bias.
+   * 
+ * + * optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the flipEnabled field is set. + */ + @java.lang.Override + public boolean hasFlipEnabled() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Default is true. Whether to flip the candidate and baseline
+   * responses. This is only applicable to the pairwise metric. If enabled, also
+   * provide PairwiseMetricSpec.candidate_response_field_name and
+   * PairwiseMetricSpec.baseline_response_field_name. When rendering
+   * PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
+   * fields will be flipped for half of the samples to reduce bias.
+   * 
+ * + * optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The flipEnabled. + */ + @java.lang.Override + public boolean getFlipEnabled() { + return flipEnabled_; + } + + public static final int AUTORATER_MODEL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object autoraterModel_ = ""; + + /** + * + * + *
+   * Optional. The fully qualified name of the publisher model or tuned
+   * autorater endpoint to use.
+   *
+   * Publisher model format:
+   * `projects/{project}/locations/{location}/publishers/*/models/*`
+   *
+   * Tuned model endpoint format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoraterModel. + */ + @java.lang.Override + public java.lang.String getAutoraterModel() { + java.lang.Object ref = autoraterModel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + autoraterModel_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The fully qualified name of the publisher model or tuned
+   * autorater endpoint to use.
+   *
+   * Publisher model format:
+   * `projects/{project}/locations/{location}/publishers/*/models/*`
+   *
+   * Tuned model endpoint format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for autoraterModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutoraterModelBytes() { + java.lang.Object ref = autoraterModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoraterModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERATION_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.GenerationConfig generationConfig_; + + /** + * + * + *
+   * Optional. Configuration options for model generation and outputs.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationConfig field is set. + */ + @java.lang.Override + public boolean hasGenerationConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Configuration options for model generation and outputs.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenerationConfig getGenerationConfig() { + return generationConfig_ == null + ? com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance() + : generationConfig_; + } + + /** + * + * + *
+   * Optional. Configuration options for model generation and outputs.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder getGenerationConfigOrBuilder() { + return generationConfig_ == null + ? com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance() + : generationConfig_; + } + + 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.writeInt32(1, samplingCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(2, flipEnabled_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoraterModel_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, autoraterModel_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getGenerationConfig()); + } + 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.computeInt32Size(1, samplingCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, flipEnabled_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoraterModel_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, autoraterModel_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGenerationConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.AutoraterConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.AutoraterConfig other = + (com.google.cloud.aiplatform.v1.AutoraterConfig) obj; + + if (hasSamplingCount() != other.hasSamplingCount()) return false; + if (hasSamplingCount()) { + if (getSamplingCount() != other.getSamplingCount()) return false; + } + if (hasFlipEnabled() != other.hasFlipEnabled()) return false; + if (hasFlipEnabled()) { + if (getFlipEnabled() != other.getFlipEnabled()) return false; + } + if (!getAutoraterModel().equals(other.getAutoraterModel())) return false; + if (hasGenerationConfig() != other.hasGenerationConfig()) return false; + if (hasGenerationConfig()) { + if (!getGenerationConfig().equals(other.getGenerationConfig())) 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 (hasSamplingCount()) { + hash = (37 * hash) + SAMPLING_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSamplingCount(); + } + if (hasFlipEnabled()) { + hash = (37 * hash) + FLIP_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFlipEnabled()); + } + hash = (37 * hash) + AUTORATER_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getAutoraterModel().hashCode(); + if (hasGenerationConfig()) { + hash = (37 * hash) + GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGenerationConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.AutoraterConfig 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 configs for autorater. This is applicable to both EvaluateInstances and
+   * EvaluateDataset.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AutoraterConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.AutoraterConfig) + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AutoraterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AutoraterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AutoraterConfig.class, + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.AutoraterConfig.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(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + samplingCount_ = 0; + flipEnabled_ = false; + autoraterModel_ = ""; + generationConfig_ = null; + if (generationConfigBuilder_ != null) { + generationConfigBuilder_.dispose(); + generationConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_AutoraterConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutoraterConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutoraterConfig build() { + com.google.cloud.aiplatform.v1.AutoraterConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutoraterConfig buildPartial() { + com.google.cloud.aiplatform.v1.AutoraterConfig result = + new com.google.cloud.aiplatform.v1.AutoraterConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.AutoraterConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.samplingCount_ = samplingCount_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.flipEnabled_ = flipEnabled_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.autoraterModel_ = autoraterModel_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.generationConfig_ = + generationConfigBuilder_ == null ? generationConfig_ : generationConfigBuilder_.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.aiplatform.v1.AutoraterConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.AutoraterConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.AutoraterConfig other) { + if (other == com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance()) return this; + if (other.hasSamplingCount()) { + setSamplingCount(other.getSamplingCount()); + } + if (other.hasFlipEnabled()) { + setFlipEnabled(other.getFlipEnabled()); + } + if (!other.getAutoraterModel().isEmpty()) { + autoraterModel_ = other.autoraterModel_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasGenerationConfig()) { + mergeGenerationConfig(other.getGenerationConfig()); + } + 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: + { + samplingCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + flipEnabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + autoraterModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetGenerationConfigFieldBuilder().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 int samplingCount_; + + /** + * + * + *
+     * Optional. Number of samples for each instance in the dataset.
+     * If not specified, the default is 4. Minimum value is 1, maximum value
+     * is 32.
+     * 
+ * + * optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the samplingCount field is set. + */ + @java.lang.Override + public boolean hasSamplingCount() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Number of samples for each instance in the dataset.
+     * If not specified, the default is 4. Minimum value is 1, maximum value
+     * is 32.
+     * 
+ * + * optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingCount. + */ + @java.lang.Override + public int getSamplingCount() { + return samplingCount_; + } + + /** + * + * + *
+     * Optional. Number of samples for each instance in the dataset.
+     * If not specified, the default is 4. Minimum value is 1, maximum value
+     * is 32.
+     * 
+ * + * optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The samplingCount to set. + * @return This builder for chaining. + */ + public Builder setSamplingCount(int value) { + + samplingCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Number of samples for each instance in the dataset.
+     * If not specified, the default is 4. Minimum value is 1, maximum value
+     * is 32.
+     * 
+ * + * optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSamplingCount() { + bitField0_ = (bitField0_ & ~0x00000001); + samplingCount_ = 0; + onChanged(); + return this; + } + + private boolean flipEnabled_; + + /** + * + * + *
+     * Optional. Default is true. Whether to flip the candidate and baseline
+     * responses. This is only applicable to the pairwise metric. If enabled, also
+     * provide PairwiseMetricSpec.candidate_response_field_name and
+     * PairwiseMetricSpec.baseline_response_field_name. When rendering
+     * PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
+     * fields will be flipped for half of the samples to reduce bias.
+     * 
+ * + * optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the flipEnabled field is set. + */ + @java.lang.Override + public boolean hasFlipEnabled() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Default is true. Whether to flip the candidate and baseline
+     * responses. This is only applicable to the pairwise metric. If enabled, also
+     * provide PairwiseMetricSpec.candidate_response_field_name and
+     * PairwiseMetricSpec.baseline_response_field_name. When rendering
+     * PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
+     * fields will be flipped for half of the samples to reduce bias.
+     * 
+ * + * optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The flipEnabled. + */ + @java.lang.Override + public boolean getFlipEnabled() { + return flipEnabled_; + } + + /** + * + * + *
+     * Optional. Default is true. Whether to flip the candidate and baseline
+     * responses. This is only applicable to the pairwise metric. If enabled, also
+     * provide PairwiseMetricSpec.candidate_response_field_name and
+     * PairwiseMetricSpec.baseline_response_field_name. When rendering
+     * PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
+     * fields will be flipped for half of the samples to reduce bias.
+     * 
+ * + * optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The flipEnabled to set. + * @return This builder for chaining. + */ + public Builder setFlipEnabled(boolean value) { + + flipEnabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Default is true. Whether to flip the candidate and baseline
+     * responses. This is only applicable to the pairwise metric. If enabled, also
+     * provide PairwiseMetricSpec.candidate_response_field_name and
+     * PairwiseMetricSpec.baseline_response_field_name. When rendering
+     * PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
+     * fields will be flipped for half of the samples to reduce bias.
+     * 
+ * + * optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFlipEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + flipEnabled_ = false; + onChanged(); + return this; + } + + private java.lang.Object autoraterModel_ = ""; + + /** + * + * + *
+     * Optional. The fully qualified name of the publisher model or tuned
+     * autorater endpoint to use.
+     *
+     * Publisher model format:
+     * `projects/{project}/locations/{location}/publishers/*/models/*`
+     *
+     * Tuned model endpoint format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoraterModel. + */ + public java.lang.String getAutoraterModel() { + java.lang.Object ref = autoraterModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + autoraterModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The fully qualified name of the publisher model or tuned
+     * autorater endpoint to use.
+     *
+     * Publisher model format:
+     * `projects/{project}/locations/{location}/publishers/*/models/*`
+     *
+     * Tuned model endpoint format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for autoraterModel. + */ + public com.google.protobuf.ByteString getAutoraterModelBytes() { + java.lang.Object ref = autoraterModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoraterModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The fully qualified name of the publisher model or tuned
+     * autorater endpoint to use.
+     *
+     * Publisher model format:
+     * `projects/{project}/locations/{location}/publishers/*/models/*`
+     *
+     * Tuned model endpoint format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The autoraterModel to set. + * @return This builder for chaining. + */ + public Builder setAutoraterModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + autoraterModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The fully qualified name of the publisher model or tuned
+     * autorater endpoint to use.
+     *
+     * Publisher model format:
+     * `projects/{project}/locations/{location}/publishers/*/models/*`
+     *
+     * Tuned model endpoint format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAutoraterModel() { + autoraterModel_ = getDefaultInstance().getAutoraterModel(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The fully qualified name of the publisher model or tuned
+     * autorater endpoint to use.
+     *
+     * Publisher model format:
+     * `projects/{project}/locations/{location}/publishers/*/models/*`
+     *
+     * Tuned model endpoint format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for autoraterModel to set. + * @return This builder for chaining. + */ + public Builder setAutoraterModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + autoraterModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.GenerationConfig generationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GenerationConfig, + com.google.cloud.aiplatform.v1.GenerationConfig.Builder, + com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder> + generationConfigBuilder_; + + /** + * + * + *
+     * Optional. Configuration options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationConfig field is set. + */ + public boolean hasGenerationConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Configuration options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationConfig. + */ + public com.google.cloud.aiplatform.v1.GenerationConfig getGenerationConfig() { + if (generationConfigBuilder_ == null) { + return generationConfig_ == null + ? com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance() + : generationConfig_; + } else { + return generationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Configuration options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGenerationConfig(com.google.cloud.aiplatform.v1.GenerationConfig value) { + if (generationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generationConfig_ = value; + } else { + generationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGenerationConfig( + com.google.cloud.aiplatform.v1.GenerationConfig.Builder builderForValue) { + if (generationConfigBuilder_ == null) { + generationConfig_ = builderForValue.build(); + } else { + generationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGenerationConfig(com.google.cloud.aiplatform.v1.GenerationConfig value) { + if (generationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && generationConfig_ != null + && generationConfig_ + != com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance()) { + getGenerationConfigBuilder().mergeFrom(value); + } else { + generationConfig_ = value; + } + } else { + generationConfigBuilder_.mergeFrom(value); + } + if (generationConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Configuration options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.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 options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.GenerationConfig.Builder getGenerationConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Configuration options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder getGenerationConfigOrBuilder() { + if (generationConfigBuilder_ != null) { + return generationConfigBuilder_.getMessageOrBuilder(); + } else { + return generationConfig_ == null + ? com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance() + : generationConfig_; + } + } + + /** + * + * + *
+     * Optional. Configuration options for model generation and outputs.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GenerationConfig, + com.google.cloud.aiplatform.v1.GenerationConfig.Builder, + com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder> + internalGetGenerationConfigFieldBuilder() { + if (generationConfigBuilder_ == null) { + generationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GenerationConfig, + com.google.cloud.aiplatform.v1.GenerationConfig.Builder, + com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder>( + getGenerationConfig(), getParentForChildren(), isClean()); + generationConfig_ = null; + } + return generationConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.AutoraterConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.AutoraterConfig) + private static final com.google.cloud.aiplatform.v1.AutoraterConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.AutoraterConfig(); + } + + public static com.google.cloud.aiplatform.v1.AutoraterConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoraterConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.AutoraterConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutoraterConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutoraterConfigOrBuilder.java new file mode 100644 index 000000000000..ee9af184a6db --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutoraterConfigOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface AutoraterConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.AutoraterConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Number of samples for each instance in the dataset.
+   * If not specified, the default is 4. Minimum value is 1, maximum value
+   * is 32.
+   * 
+ * + * optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the samplingCount field is set. + */ + boolean hasSamplingCount(); + + /** + * + * + *
+   * Optional. Number of samples for each instance in the dataset.
+   * If not specified, the default is 4. Minimum value is 1, maximum value
+   * is 32.
+   * 
+ * + * optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingCount. + */ + int getSamplingCount(); + + /** + * + * + *
+   * Optional. Default is true. Whether to flip the candidate and baseline
+   * responses. This is only applicable to the pairwise metric. If enabled, also
+   * provide PairwiseMetricSpec.candidate_response_field_name and
+   * PairwiseMetricSpec.baseline_response_field_name. When rendering
+   * PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
+   * fields will be flipped for half of the samples to reduce bias.
+   * 
+ * + * optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the flipEnabled field is set. + */ + boolean hasFlipEnabled(); + + /** + * + * + *
+   * Optional. Default is true. Whether to flip the candidate and baseline
+   * responses. This is only applicable to the pairwise metric. If enabled, also
+   * provide PairwiseMetricSpec.candidate_response_field_name and
+   * PairwiseMetricSpec.baseline_response_field_name. When rendering
+   * PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
+   * fields will be flipped for half of the samples to reduce bias.
+   * 
+ * + * optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The flipEnabled. + */ + boolean getFlipEnabled(); + + /** + * + * + *
+   * Optional. The fully qualified name of the publisher model or tuned
+   * autorater endpoint to use.
+   *
+   * Publisher model format:
+   * `projects/{project}/locations/{location}/publishers/*/models/*`
+   *
+   * Tuned model endpoint format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoraterModel. + */ + java.lang.String getAutoraterModel(); + + /** + * + * + *
+   * Optional. The fully qualified name of the publisher model or tuned
+   * autorater endpoint to use.
+   *
+   * Publisher model format:
+   * `projects/{project}/locations/{location}/publishers/*/models/*`
+   *
+   * Tuned model endpoint format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for autoraterModel. + */ + com.google.protobuf.ByteString getAutoraterModelBytes(); + + /** + * + * + *
+   * Optional. Configuration options for model generation and outputs.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationConfig field is set. + */ + boolean hasGenerationConfig(); + + /** + * + * + *
+   * Optional. Configuration options for model generation and outputs.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationConfig. + */ + com.google.cloud.aiplatform.v1.GenerationConfig getGenerationConfig(); + + /** + * + * + *
+   * Optional. Configuration options for model generation and outputs.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder getGenerationConfigOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputationBasedMetricSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputationBasedMetricSpec.java new file mode 100644 index 000000000000..9462882ab20f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputationBasedMetricSpec.java @@ -0,0 +1,1149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Specification for a computation based metric.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ComputationBasedMetricSpec} + */ +@com.google.protobuf.Generated +public final class ComputationBasedMetricSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ComputationBasedMetricSpec) + ComputationBasedMetricSpecOrBuilder { + 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= */ "", + "ComputationBasedMetricSpec"); + } + + // Use ComputationBasedMetricSpec.newBuilder() to construct. + private ComputationBasedMetricSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ComputationBasedMetricSpec() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.class, + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.Builder.class); + } + + /** + * + * + *
+   * Types of computation based metrics.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType} + */ + public enum ComputationBasedMetricType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified computation based metric type.
+     * 
+ * + * COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED = 0; + */ + COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Exact match metric.
+     * 
+ * + * EXACT_MATCH = 1; + */ + EXACT_MATCH(1), + /** + * + * + *
+     * BLEU metric.
+     * 
+ * + * BLEU = 2; + */ + BLEU(2), + /** + * + * + *
+     * ROUGE metric.
+     * 
+ * + * ROUGE = 3; + */ + ROUGE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ComputationBasedMetricType"); + } + + /** + * + * + *
+     * Unspecified computation based metric type.
+     * 
+ * + * COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED = 0; + */ + public static final int COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Exact match metric.
+     * 
+ * + * EXACT_MATCH = 1; + */ + public static final int EXACT_MATCH_VALUE = 1; + + /** + * + * + *
+     * BLEU metric.
+     * 
+ * + * BLEU = 2; + */ + public static final int BLEU_VALUE = 2; + + /** + * + * + *
+     * ROUGE metric.
+     * 
+ * + * ROUGE = 3; + */ + public static final int ROUGE_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 ComputationBasedMetricType 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 ComputationBasedMetricType forNumber(int value) { + switch (value) { + case 0: + return COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED; + case 1: + return EXACT_MATCH; + case 2: + return BLEU; + case 3: + return ROUGE; + 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 ComputationBasedMetricType findValueByNumber(int number) { + return ComputationBasedMetricType.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.v1.ComputationBasedMetricSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ComputationBasedMetricType[] VALUES = values(); + + public static ComputationBasedMetricType 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 ComputationBasedMetricType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+   * Required. The type of the computation based metric.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The type of the computation based metric.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Required. The type of the computation based metric.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType + getType() { + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType result = + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType + .forNumber(type_); + return result == null + ? com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType + .UNRECOGNIZED + : result; + } + + public static final int PARAMETERS_FIELD_NUMBER = 2; + private com.google.protobuf.Struct parameters_; + + /** + * + * + *
+   * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+   * "rougeL"}.
+   * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the parameters field is set. + */ + @java.lang.Override + public boolean hasParameters() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+   * "rougeL"}.
+   * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getParameters() { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + + /** + * + * + *
+   * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+   * "rougeL"}.
+   * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + + 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.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getParameters()); + } + 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.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParameters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec other = + (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) obj; + + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (type_ != other.type_) return false; + } + if (hasParameters() != other.hasParameters()) return false; + if (hasParameters()) { + if (!getParameters().equals(other.getParameters())) 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 (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + } + if (hasParameters()) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec 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 a computation based metric.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ComputationBasedMetricSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ComputationBasedMetricSpec) + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.class, + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec build() { + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec buildPartial() { + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec result = + new com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.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.aiplatform.v1.ComputationBasedMetricSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec other) { + if (other == com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance()) + return this; + if (other.hasType()) { + setTypeValue(other.getTypeValue()); + } + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + 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 18: + { + input.readMessage( + internalGetParametersFieldBuilder().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 type_ = 0; + + /** + * + * + *
+     * Required. The type of the computation based metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The type of the computation based metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Required. The type of the computation based metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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; + } + + /** + * + * + *
+     * Required. The type of the computation based metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType + getType() { + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType result = + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType + .forNumber(type_); + return result == null + ? com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. The type of the computation based metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the computation based metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Struct parameters_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the parameters field is set. + */ + public boolean hasParameters() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + public com.google.protobuf.Struct getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + } else { + parametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (parametersBuilder_ == null) { + parameters_ = builderForValue.build(); + } else { + parametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeParameters(com.google.protobuf.Struct value) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && parameters_ != null + && parameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getParametersBuilder().mergeFrom(value); + } else { + parameters_ = value; + } + } else { + parametersBuilder_.mergeFrom(value); + } + if (parameters_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearParameters() { + bitField0_ = (bitField0_ & ~0x00000002); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getParametersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetParametersFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; + } + } + + /** + * + * + *
+     * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+     * "rougeL"}.
+     * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getParameters(), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ComputationBasedMetricSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ComputationBasedMetricSpec) + private static final com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec(); + } + + public static com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputationBasedMetricSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.ComputationBasedMetricSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputationBasedMetricSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputationBasedMetricSpecOrBuilder.java new file mode 100644 index 000000000000..98de81c64586 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ComputationBasedMetricSpecOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface ComputationBasedMetricSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ComputationBasedMetricSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The type of the computation based metric.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
+   * Required. The type of the computation based metric.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Required. The type of the computation based metric.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.ComputationBasedMetricType getType(); + + /** + * + * + *
+   * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+   * "rougeL"}.
+   * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the parameters field is set. + */ + boolean hasParameters(); + + /** + * + * + *
+   * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+   * "rougeL"}.
+   * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + com.google.protobuf.Struct getParameters(); + + /** + * + * + *
+   * Optional. A map of parameters for the metric, e.g. {"rouge_type":
+   * "rougeL"}.
+   * 
+ * + * + * optional .google.protobuf.Struct parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getParametersOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentMap.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentMap.java new file mode 100644 index 000000000000..95c5d2f28a7a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentMap.java @@ -0,0 +1,1888 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Map of placeholder in metric prompt template to contents of model input.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ContentMap} + */ +@com.google.protobuf.Generated +public final class ContentMap extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ContentMap) + ContentMapOrBuilder { + 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= */ "", + "ContentMap"); + } + + // Use ContentMap.newBuilder() to construct. + private ContentMap(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ContentMap() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ContentMap.class, + com.google.cloud.aiplatform.v1.ContentMap.Builder.class); + } + + public interface ContentsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ContentMap.Contents) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getContentsList(); + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.Content getContents(int index); + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getContentsCount(); + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getContentsOrBuilderList(); + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.ContentOrBuilder getContentsOrBuilder(int index); + } + + /** + * + * + *
+   * Repeated Content type.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ContentMap.Contents} + */ + public static final class Contents extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ContentMap.Contents) + ContentsOrBuilder { + 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= */ "", + "Contents"); + } + + // Use Contents.newBuilder() to construct. + private Contents(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Contents() { + contents_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ContentMap.Contents.class, + com.google.cloud.aiplatform.v1.ContentMap.Contents.Builder.class); + } + + public static final int CONTENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List contents_; + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getContentsList() { + return contents_; + } + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getContentsOrBuilderList() { + return contents_; + } + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getContentsCount() { + return contents_.size(); + } + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Content getContents(int index) { + return contents_.get(index); + } + + /** + * + * + *
+     * Optional. Repeated contents.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentOrBuilder getContentsOrBuilder(int index) { + return contents_.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 < contents_.size(); i++) { + output.writeMessage(1, contents_.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 < contents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contents_.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.aiplatform.v1.ContentMap.Contents)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ContentMap.Contents other = + (com.google.cloud.aiplatform.v1.ContentMap.Contents) obj; + + if (!getContentsList().equals(other.getContentsList())) 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 (getContentsCount() > 0) { + hash = (37 * hash) + CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getContentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ContentMap.Contents 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; + } + + /** + * + * + *
+     * Repeated Content type.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ContentMap.Contents} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ContentMap.Contents) + com.google.cloud.aiplatform.v1.ContentMap.ContentsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ContentMap.Contents.class, + com.google.cloud.aiplatform.v1.ContentMap.Contents.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ContentMap.Contents.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (contentsBuilder_ == null) { + contents_ = java.util.Collections.emptyList(); + } else { + contents_ = null; + contentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap.Contents getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ContentMap.Contents.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap.Contents build() { + com.google.cloud.aiplatform.v1.ContentMap.Contents result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap.Contents buildPartial() { + com.google.cloud.aiplatform.v1.ContentMap.Contents result = + new com.google.cloud.aiplatform.v1.ContentMap.Contents(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ContentMap.Contents result) { + if (contentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contents_ = java.util.Collections.unmodifiableList(contents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contents_ = contents_; + } else { + result.contents_ = contentsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ContentMap.Contents result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ContentMap.Contents) { + return mergeFrom((com.google.cloud.aiplatform.v1.ContentMap.Contents) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ContentMap.Contents other) { + if (other == com.google.cloud.aiplatform.v1.ContentMap.Contents.getDefaultInstance()) + return this; + if (contentsBuilder_ == null) { + if (!other.contents_.isEmpty()) { + if (contents_.isEmpty()) { + contents_ = other.contents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContentsIsMutable(); + contents_.addAll(other.contents_); + } + onChanged(); + } + } else { + if (!other.contents_.isEmpty()) { + if (contentsBuilder_.isEmpty()) { + contentsBuilder_.dispose(); + contentsBuilder_ = null; + contents_ = other.contents_; + bitField0_ = (bitField0_ & ~0x00000001); + contentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetContentsFieldBuilder() + : null; + } else { + contentsBuilder_.addAllMessages(other.contents_); + } + } + } + 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.aiplatform.v1.Content m = + input.readMessage( + com.google.cloud.aiplatform.v1.Content.parser(), extensionRegistry); + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.add(m); + } else { + contentsBuilder_.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 contents_ = + java.util.Collections.emptyList(); + + private void ensureContentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contents_ = new java.util.ArrayList(contents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder> + contentsBuilder_; + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getContentsList() { + if (contentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contents_); + } else { + return contentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getContentsCount() { + if (contentsBuilder_ == null) { + return contents_.size(); + } else { + return contentsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.Content getContents(int index) { + if (contentsBuilder_ == null) { + return contents_.get(index); + } else { + return contentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setContents(int index, com.google.cloud.aiplatform.v1.Content value) { + if (contentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentsIsMutable(); + contents_.set(index, value); + onChanged(); + } else { + contentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setContents( + int index, com.google.cloud.aiplatform.v1.Content.Builder builderForValue) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.set(index, builderForValue.build()); + onChanged(); + } else { + contentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addContents(com.google.cloud.aiplatform.v1.Content value) { + if (contentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentsIsMutable(); + contents_.add(value); + onChanged(); + } else { + contentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addContents(int index, com.google.cloud.aiplatform.v1.Content value) { + if (contentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentsIsMutable(); + contents_.add(index, value); + onChanged(); + } else { + contentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addContents(com.google.cloud.aiplatform.v1.Content.Builder builderForValue) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.add(builderForValue.build()); + onChanged(); + } else { + contentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addContents( + int index, com.google.cloud.aiplatform.v1.Content.Builder builderForValue) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.add(index, builderForValue.build()); + onChanged(); + } else { + contentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllContents( + java.lang.Iterable values) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contents_); + onChanged(); + } else { + contentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearContents() { + if (contentsBuilder_ == null) { + contents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeContents(int index) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.remove(index); + onChanged(); + } else { + contentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.Content.Builder getContentsBuilder(int index) { + return internalGetContentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ContentOrBuilder getContentsOrBuilder(int index) { + if (contentsBuilder_ == null) { + return contents_.get(index); + } else { + return contentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getContentsOrBuilderList() { + if (contentsBuilder_ != null) { + return contentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contents_); + } + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.Content.Builder addContentsBuilder() { + return internalGetContentsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Content.getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.Content.Builder addContentsBuilder(int index) { + return internalGetContentsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Content.getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. Repeated contents.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content contents = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getContentsBuilderList() { + return internalGetContentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder> + internalGetContentsFieldBuilder() { + if (contentsBuilder_ == null) { + contentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder>( + contents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + contents_ = null; + } + return contentsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ContentMap.Contents) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ContentMap.Contents) + private static final com.google.cloud.aiplatform.v1.ContentMap.Contents DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ContentMap.Contents(); + } + + public static com.google.cloud.aiplatform.v1.ContentMap.Contents getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Contents parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.ContentMap.Contents getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int VALUES_FIELD_NUMBER = 1; + + private static final class ValuesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.aiplatform.v1.ContentMap.Contents> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_ValuesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.aiplatform.v1.ContentMap.Contents.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.aiplatform.v1.ContentMap.Contents> + values_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.aiplatform.v1.ContentMap.Contents> + internalGetValues() { + if (values_ == null) { + return com.google.protobuf.MapField.emptyMapField(ValuesDefaultEntryHolder.defaultEntry); + } + return values_; + } + + public int getValuesCount() { + return internalGetValues().getMap().size(); + } + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetValues().getMap().containsKey(key); + } + + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getValues() { + return getValuesMap(); + } + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getValuesMap() { + return internalGetValues().getMap(); + } + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.aiplatform.v1.ContentMap.Contents getValuesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.aiplatform.v1.ContentMap.Contents defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetValues().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap.Contents getValuesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetValues().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + 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; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetValues(), ValuesDefaultEntryHolder.defaultEntry, 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry + entry : internalGetValues().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.aiplatform.v1.ContentMap.Contents> + values__ = + ValuesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, values__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ContentMap)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ContentMap other = + (com.google.cloud.aiplatform.v1.ContentMap) obj; + + if (!internalGetValues().equals(other.internalGetValues())) 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 (!internalGetValues().getMap().isEmpty()) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + internalGetValues().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContentMap parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ContentMap 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; + } + + /** + * + * + *
+   * Map of placeholder in metric prompt template to contents of model input.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ContentMap} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ContentMap) + com.google.cloud.aiplatform.v1.ContentMapOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ContentMap.class, + com.google.cloud.aiplatform.v1.ContentMap.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ContentMap.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableValues().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_ContentMap_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap build() { + com.google.cloud.aiplatform.v1.ContentMap result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap buildPartial() { + com.google.cloud.aiplatform.v1.ContentMap result = + new com.google.cloud.aiplatform.v1.ContentMap(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ContentMap result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.values_ = internalGetValues().build(ValuesDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ContentMap) { + return mergeFrom((com.google.cloud.aiplatform.v1.ContentMap) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ContentMap other) { + if (other == com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance()) return this; + internalGetMutableValues().mergeFrom(other.internalGetValues()); + bitField0_ |= 0x00000001; + 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.protobuf.MapEntry< + java.lang.String, com.google.cloud.aiplatform.v1.ContentMap.Contents> + values__ = + input.readMessage( + ValuesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableValues() + .ensureBuilderMap() + .put(values__.getKey(), values__.getValue()); + 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 static final class ValuesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.aiplatform.v1.ContentMap.ContentsOrBuilder, + com.google.cloud.aiplatform.v1.ContentMap.Contents> { + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap.Contents build( + com.google.cloud.aiplatform.v1.ContentMap.ContentsOrBuilder val) { + if (val instanceof com.google.cloud.aiplatform.v1.ContentMap.Contents) { + return (com.google.cloud.aiplatform.v1.ContentMap.Contents) val; + } + return ((com.google.cloud.aiplatform.v1.ContentMap.Contents.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.aiplatform.v1.ContentMap.Contents> + defaultEntry() { + return ValuesDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final ValuesConverter valuesConverter = new ValuesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1.ContentMap.ContentsOrBuilder, + com.google.cloud.aiplatform.v1.ContentMap.Contents, + com.google.cloud.aiplatform.v1.ContentMap.Contents.Builder> + values_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1.ContentMap.ContentsOrBuilder, + com.google.cloud.aiplatform.v1.ContentMap.Contents, + com.google.cloud.aiplatform.v1.ContentMap.Contents.Builder> + internalGetValues() { + if (values_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(valuesConverter); + } + return values_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1.ContentMap.ContentsOrBuilder, + com.google.cloud.aiplatform.v1.ContentMap.Contents, + com.google.cloud.aiplatform.v1.ContentMap.Contents.Builder> + internalGetMutableValues() { + if (values_ == null) { + values_ = new com.google.protobuf.MapFieldBuilder<>(valuesConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return values_; + } + + public int getValuesCount() { + return internalGetValues().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * Optional. Map of placeholder to contents.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetValues().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getValues() { + return getValuesMap(); + } + + /** + * + * + *
+     * Optional. Map of placeholder to contents.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getValuesMap() { + return internalGetValues().getImmutableMap(); + } + + /** + * + * + *
+     * Optional. Map of placeholder to contents.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.aiplatform.v1.ContentMap.Contents getValuesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.aiplatform.v1.ContentMap.Contents defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetMutableValues().ensureBuilderMap(); + return map.containsKey(key) ? valuesConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * Optional. Map of placeholder to contents.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap.Contents getValuesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetMutableValues().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return valuesConverter.build(map.get(key)); + } + + public Builder clearValues() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableValues().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Map of placeholder to contents.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableValues().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableValues() { + bitField0_ |= 0x00000001; + return internalGetMutableValues().ensureMessageMap(); + } + + /** + * + * + *
+     * Optional. Map of placeholder to contents.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putValues( + java.lang.String key, com.google.cloud.aiplatform.v1.ContentMap.Contents value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableValues().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + + /** + * + * + *
+     * Optional. Map of placeholder to contents.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllValues( + java.util.Map + values) { + for (java.util.Map.Entry + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableValues().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + /** + * + * + *
+     * Optional. Map of placeholder to contents.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ContentMap.Contents.Builder putValuesBuilderIfAbsent( + java.lang.String key) { + java.util.Map + builderMap = internalGetMutableValues().ensureBuilderMap(); + com.google.cloud.aiplatform.v1.ContentMap.ContentsOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.aiplatform.v1.ContentMap.Contents.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.aiplatform.v1.ContentMap.Contents) { + entry = ((com.google.cloud.aiplatform.v1.ContentMap.Contents) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.aiplatform.v1.ContentMap.Contents.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ContentMap) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ContentMap) + private static final com.google.cloud.aiplatform.v1.ContentMap DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ContentMap(); + } + + public static com.google.cloud.aiplatform.v1.ContentMap getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContentMap parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.ContentMap getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentMapOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentMapOrBuilder.java new file mode 100644 index 000000000000..cc50e2d061d5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentMapOrBuilder.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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface ContentMapOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ContentMap) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getValuesCount(); + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsValues(java.lang.String key); + + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getValues(); + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getValuesMap(); + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.cloud.aiplatform.v1.ContentMap.Contents getValuesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.aiplatform.v1.ContentMap.Contents defaultValue); + + /** + * + * + *
+   * Optional. Map of placeholder to contents.
+   * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.ContentMap.Contents> values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.ContentMap.Contents getValuesOrThrow(java.lang.String key); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutput.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutput.java new file mode 100644 index 000000000000..9e5010f0e9b4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutput.java @@ -0,0 +1,817 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Spec for custom output.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CustomOutput} + */ +@com.google.protobuf.Generated +public final class CustomOutput extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CustomOutput) + CustomOutputOrBuilder { + 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= */ "", + "CustomOutput"); + } + + // Use CustomOutput.newBuilder() to construct. + private CustomOutput(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CustomOutput() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CustomOutput.class, + com.google.cloud.aiplatform.v1.CustomOutput.Builder.class); + } + + private int customOutputCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object customOutput_; + + public enum CustomOutputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RAW_OUTPUTS(1), + CUSTOMOUTPUT_NOT_SET(0); + private final int value; + + private CustomOutputCase(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 CustomOutputCase valueOf(int value) { + return forNumber(value); + } + + public static CustomOutputCase forNumber(int value) { + switch (value) { + case 1: + return RAW_OUTPUTS; + case 0: + return CUSTOMOUTPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CustomOutputCase getCustomOutputCase() { + return CustomOutputCase.forNumber(customOutputCase_); + } + + public static final int RAW_OUTPUTS_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Output only. List of raw output strings.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rawOutputs field is set. + */ + @java.lang.Override + public boolean hasRawOutputs() { + return customOutputCase_ == 1; + } + + /** + * + * + *
+   * Output only. List of raw output strings.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rawOutputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RawOutput getRawOutputs() { + if (customOutputCase_ == 1) { + return (com.google.cloud.aiplatform.v1.RawOutput) customOutput_; + } + return com.google.cloud.aiplatform.v1.RawOutput.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. List of raw output strings.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RawOutputOrBuilder getRawOutputsOrBuilder() { + if (customOutputCase_ == 1) { + return (com.google.cloud.aiplatform.v1.RawOutput) customOutput_; + } + return com.google.cloud.aiplatform.v1.RawOutput.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 (customOutputCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1.RawOutput) customOutput_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (customOutputCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1.RawOutput) customOutput_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CustomOutput)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CustomOutput other = + (com.google.cloud.aiplatform.v1.CustomOutput) obj; + + if (!getCustomOutputCase().equals(other.getCustomOutputCase())) return false; + switch (customOutputCase_) { + case 1: + if (!getRawOutputs().equals(other.getRawOutputs())) 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 (customOutputCase_) { + case 1: + hash = (37 * hash) + RAW_OUTPUTS_FIELD_NUMBER; + hash = (53 * hash) + getRawOutputs().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.CustomOutput 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; + } + + /** + * + * + *
+   * Spec for custom output.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CustomOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CustomOutput) + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CustomOutput.class, + com.google.cloud.aiplatform.v1.CustomOutput.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CustomOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rawOutputsBuilder_ != null) { + rawOutputsBuilder_.clear(); + } + customOutputCase_ = 0; + customOutput_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutput getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutput build() { + com.google.cloud.aiplatform.v1.CustomOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutput buildPartial() { + com.google.cloud.aiplatform.v1.CustomOutput result = + new com.google.cloud.aiplatform.v1.CustomOutput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CustomOutput result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.CustomOutput result) { + result.customOutputCase_ = customOutputCase_; + result.customOutput_ = this.customOutput_; + if (customOutputCase_ == 1 && rawOutputsBuilder_ != null) { + result.customOutput_ = rawOutputsBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CustomOutput) { + return mergeFrom((com.google.cloud.aiplatform.v1.CustomOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomOutput other) { + if (other == com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance()) return this; + switch (other.getCustomOutputCase()) { + case RAW_OUTPUTS: + { + mergeRawOutputs(other.getRawOutputs()); + break; + } + case CUSTOMOUTPUT_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( + internalGetRawOutputsFieldBuilder().getBuilder(), extensionRegistry); + customOutputCase_ = 1; + 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 customOutputCase_ = 0; + private java.lang.Object customOutput_; + + public CustomOutputCase getCustomOutputCase() { + return CustomOutputCase.forNumber(customOutputCase_); + } + + public Builder clearCustomOutput() { + customOutputCase_ = 0; + customOutput_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RawOutput, + com.google.cloud.aiplatform.v1.RawOutput.Builder, + com.google.cloud.aiplatform.v1.RawOutputOrBuilder> + rawOutputsBuilder_; + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rawOutputs field is set. + */ + @java.lang.Override + public boolean hasRawOutputs() { + return customOutputCase_ == 1; + } + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rawOutputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RawOutput getRawOutputs() { + if (rawOutputsBuilder_ == null) { + if (customOutputCase_ == 1) { + return (com.google.cloud.aiplatform.v1.RawOutput) customOutput_; + } + return com.google.cloud.aiplatform.v1.RawOutput.getDefaultInstance(); + } else { + if (customOutputCase_ == 1) { + return rawOutputsBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.RawOutput.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRawOutputs(com.google.cloud.aiplatform.v1.RawOutput value) { + if (rawOutputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customOutput_ = value; + onChanged(); + } else { + rawOutputsBuilder_.setMessage(value); + } + customOutputCase_ = 1; + return this; + } + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRawOutputs(com.google.cloud.aiplatform.v1.RawOutput.Builder builderForValue) { + if (rawOutputsBuilder_ == null) { + customOutput_ = builderForValue.build(); + onChanged(); + } else { + rawOutputsBuilder_.setMessage(builderForValue.build()); + } + customOutputCase_ = 1; + return this; + } + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRawOutputs(com.google.cloud.aiplatform.v1.RawOutput value) { + if (rawOutputsBuilder_ == null) { + if (customOutputCase_ == 1 + && customOutput_ != com.google.cloud.aiplatform.v1.RawOutput.getDefaultInstance()) { + customOutput_ = + com.google.cloud.aiplatform.v1.RawOutput.newBuilder( + (com.google.cloud.aiplatform.v1.RawOutput) customOutput_) + .mergeFrom(value) + .buildPartial(); + } else { + customOutput_ = value; + } + onChanged(); + } else { + if (customOutputCase_ == 1) { + rawOutputsBuilder_.mergeFrom(value); + } else { + rawOutputsBuilder_.setMessage(value); + } + } + customOutputCase_ = 1; + return this; + } + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRawOutputs() { + if (rawOutputsBuilder_ == null) { + if (customOutputCase_ == 1) { + customOutputCase_ = 0; + customOutput_ = null; + onChanged(); + } + } else { + if (customOutputCase_ == 1) { + customOutputCase_ = 0; + customOutput_ = null; + } + rawOutputsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.RawOutput.Builder getRawOutputsBuilder() { + return internalGetRawOutputsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RawOutputOrBuilder getRawOutputsOrBuilder() { + if ((customOutputCase_ == 1) && (rawOutputsBuilder_ != null)) { + return rawOutputsBuilder_.getMessageOrBuilder(); + } else { + if (customOutputCase_ == 1) { + return (com.google.cloud.aiplatform.v1.RawOutput) customOutput_; + } + return com.google.cloud.aiplatform.v1.RawOutput.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. List of raw output strings.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RawOutput, + com.google.cloud.aiplatform.v1.RawOutput.Builder, + com.google.cloud.aiplatform.v1.RawOutputOrBuilder> + internalGetRawOutputsFieldBuilder() { + if (rawOutputsBuilder_ == null) { + if (!(customOutputCase_ == 1)) { + customOutput_ = com.google.cloud.aiplatform.v1.RawOutput.getDefaultInstance(); + } + rawOutputsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RawOutput, + com.google.cloud.aiplatform.v1.RawOutput.Builder, + com.google.cloud.aiplatform.v1.RawOutputOrBuilder>( + (com.google.cloud.aiplatform.v1.RawOutput) customOutput_, + getParentForChildren(), + isClean()); + customOutput_ = null; + } + customOutputCase_ = 1; + onChanged(); + return rawOutputsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CustomOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CustomOutput) + private static final com.google.cloud.aiplatform.v1.CustomOutput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CustomOutput(); + } + + public static com.google.cloud.aiplatform.v1.CustomOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.CustomOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputFormatConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputFormatConfig.java new file mode 100644 index 000000000000..d9e43b4af733 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputFormatConfig.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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Spec for custom output format configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CustomOutputFormatConfig} + */ +@com.google.protobuf.Generated +public final class CustomOutputFormatConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CustomOutputFormatConfig) + CustomOutputFormatConfigOrBuilder { + 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= */ "", + "CustomOutputFormatConfig"); + } + + // Use CustomOutputFormatConfig.newBuilder() to construct. + private CustomOutputFormatConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CustomOutputFormatConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.class, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder.class); + } + + private int customOutputFormatConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object customOutputFormatConfig_; + + public enum CustomOutputFormatConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RETURN_RAW_OUTPUT(1), + CUSTOMOUTPUTFORMATCONFIG_NOT_SET(0); + private final int value; + + private CustomOutputFormatConfigCase(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 CustomOutputFormatConfigCase valueOf(int value) { + return forNumber(value); + } + + public static CustomOutputFormatConfigCase forNumber(int value) { + switch (value) { + case 1: + return RETURN_RAW_OUTPUT; + case 0: + return CUSTOMOUTPUTFORMATCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CustomOutputFormatConfigCase getCustomOutputFormatConfigCase() { + return CustomOutputFormatConfigCase.forNumber(customOutputFormatConfigCase_); + } + + public static final int RETURN_RAW_OUTPUT_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Optional. Whether to return raw output.
+   * 
+ * + * bool return_raw_output = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the returnRawOutput field is set. + */ + @java.lang.Override + public boolean hasReturnRawOutput() { + return customOutputFormatConfigCase_ == 1; + } + + /** + * + * + *
+   * Optional. Whether to return raw output.
+   * 
+ * + * bool return_raw_output = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnRawOutput. + */ + @java.lang.Override + public boolean getReturnRawOutput() { + if (customOutputFormatConfigCase_ == 1) { + return (java.lang.Boolean) customOutputFormatConfig_; + } + return false; + } + + 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 (customOutputFormatConfigCase_ == 1) { + output.writeBool(1, (boolean) ((java.lang.Boolean) customOutputFormatConfig_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (customOutputFormatConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 1, (boolean) ((java.lang.Boolean) customOutputFormatConfig_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CustomOutputFormatConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig other = + (com.google.cloud.aiplatform.v1.CustomOutputFormatConfig) obj; + + if (!getCustomOutputFormatConfigCase().equals(other.getCustomOutputFormatConfigCase())) + return false; + switch (customOutputFormatConfigCase_) { + case 1: + if (getReturnRawOutput() != other.getReturnRawOutput()) 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 (customOutputFormatConfigCase_) { + case 1: + hash = (37 * hash) + RETURN_RAW_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnRawOutput()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig 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; + } + + /** + * + * + *
+   * Spec for custom output format configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CustomOutputFormatConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CustomOutputFormatConfig) + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.class, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + customOutputFormatConfigCase_ = 0; + customOutputFormatConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig build() { + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig buildPartial() { + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig result = + new com.google.cloud.aiplatform.v1.CustomOutputFormatConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CustomOutputFormatConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig result) { + result.customOutputFormatConfigCase_ = customOutputFormatConfigCase_; + result.customOutputFormatConfig_ = this.customOutputFormatConfig_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CustomOutputFormatConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.CustomOutputFormatConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomOutputFormatConfig other) { + if (other == com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance()) + return this; + switch (other.getCustomOutputFormatConfigCase()) { + case RETURN_RAW_OUTPUT: + { + setReturnRawOutput(other.getReturnRawOutput()); + break; + } + case CUSTOMOUTPUTFORMATCONFIG_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: + { + customOutputFormatConfig_ = input.readBool(); + customOutputFormatConfigCase_ = 1; + 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 customOutputFormatConfigCase_ = 0; + private java.lang.Object customOutputFormatConfig_; + + public CustomOutputFormatConfigCase getCustomOutputFormatConfigCase() { + return CustomOutputFormatConfigCase.forNumber(customOutputFormatConfigCase_); + } + + public Builder clearCustomOutputFormatConfig() { + customOutputFormatConfigCase_ = 0; + customOutputFormatConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Optional. Whether to return raw output.
+     * 
+ * + * bool return_raw_output = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the returnRawOutput field is set. + */ + public boolean hasReturnRawOutput() { + return customOutputFormatConfigCase_ == 1; + } + + /** + * + * + *
+     * Optional. Whether to return raw output.
+     * 
+ * + * bool return_raw_output = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnRawOutput. + */ + public boolean getReturnRawOutput() { + if (customOutputFormatConfigCase_ == 1) { + return (java.lang.Boolean) customOutputFormatConfig_; + } + return false; + } + + /** + * + * + *
+     * Optional. Whether to return raw output.
+     * 
+ * + * bool return_raw_output = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The returnRawOutput to set. + * @return This builder for chaining. + */ + public Builder setReturnRawOutput(boolean value) { + + customOutputFormatConfigCase_ = 1; + customOutputFormatConfig_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to return raw output.
+     * 
+ * + * bool return_raw_output = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReturnRawOutput() { + if (customOutputFormatConfigCase_ == 1) { + customOutputFormatConfigCase_ = 0; + customOutputFormatConfig_ = null; + onChanged(); + } + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CustomOutputFormatConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CustomOutputFormatConfig) + private static final com.google.cloud.aiplatform.v1.CustomOutputFormatConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CustomOutputFormatConfig(); + } + + public static com.google.cloud.aiplatform.v1.CustomOutputFormatConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomOutputFormatConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.CustomOutputFormatConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputFormatConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputFormatConfigOrBuilder.java new file mode 100644 index 000000000000..401578278a30 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputFormatConfigOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface CustomOutputFormatConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CustomOutputFormatConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Whether to return raw output.
+   * 
+ * + * bool return_raw_output = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the returnRawOutput field is set. + */ + boolean hasReturnRawOutput(); + + /** + * + * + *
+   * Optional. Whether to return raw output.
+   * 
+ * + * bool return_raw_output = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnRawOutput. + */ + boolean getReturnRawOutput(); + + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.CustomOutputFormatConfigCase + getCustomOutputFormatConfigCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputOrBuilder.java new file mode 100644 index 000000000000..02a9da20be94 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomOutputOrBuilder.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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface CustomOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CustomOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. List of raw output strings.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rawOutputs field is set. + */ + boolean hasRawOutputs(); + + /** + * + * + *
+   * Output only. List of raw output strings.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rawOutputs. + */ + com.google.cloud.aiplatform.v1.RawOutput getRawOutputs(); + + /** + * + * + *
+   * Output only. List of raw output strings.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RawOutput raw_outputs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.RawOutputOrBuilder getRawOutputsOrBuilder(); + + com.google.cloud.aiplatform.v1.CustomOutput.CustomOutputCase getCustomOutputCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetResponse.java new file mode 100644 index 000000000000..e3943575fcbd --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetResponse.java @@ -0,0 +1,1047 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The results from an evaluation run performed by the EvaluationService.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EvaluateDatasetResponse} + */ +@com.google.protobuf.Generated +public final class EvaluateDatasetResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.EvaluateDatasetResponse) + EvaluateDatasetResponseOrBuilder { + 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= */ "", + "EvaluateDatasetResponse"); + } + + // Use EvaluateDatasetResponse.newBuilder() to construct. + private EvaluateDatasetResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EvaluateDatasetResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.class, + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.Builder.class); + } + + private int bitField0_; + public static final int AGGREGATION_OUTPUT_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.AggregationOutput aggregationOutput_; + + /** + * + * + *
+   * Output only. Aggregation statistics derived from results of
+   * EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregationOutput field is set. + */ + @java.lang.Override + public boolean hasAggregationOutput() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Aggregation statistics derived from results of
+   * EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregationOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationOutput getAggregationOutput() { + return aggregationOutput_ == null + ? com.google.cloud.aiplatform.v1.AggregationOutput.getDefaultInstance() + : aggregationOutput_; + } + + /** + * + * + *
+   * Output only. Aggregation statistics derived from results of
+   * EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AggregationOutputOrBuilder getAggregationOutputOrBuilder() { + return aggregationOutput_ == null + ? com.google.cloud.aiplatform.v1.AggregationOutput.getDefaultInstance() + : aggregationOutput_; + } + + public static final int OUTPUT_INFO_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.OutputInfo outputInfo_; + + /** + * + * + *
+   * Output only. Output info for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + @java.lang.Override + public boolean hasOutputInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Output info for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputInfo getOutputInfo() { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.OutputInfo.getDefaultInstance() + : outputInfo_; + } + + /** + * + * + *
+   * Output only. Output info for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputInfoOrBuilder getOutputInfoOrBuilder() { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.OutputInfo.getDefaultInstance() + : outputInfo_; + } + + 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, getAggregationOutput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getOutputInfo()); + } + 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, getAggregationOutput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputInfo()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.EvaluateDatasetResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse other = + (com.google.cloud.aiplatform.v1.EvaluateDatasetResponse) obj; + + if (hasAggregationOutput() != other.hasAggregationOutput()) return false; + if (hasAggregationOutput()) { + if (!getAggregationOutput().equals(other.getAggregationOutput())) return false; + } + if (hasOutputInfo() != other.hasOutputInfo()) return false; + if (hasOutputInfo()) { + if (!getOutputInfo().equals(other.getOutputInfo())) 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 (hasAggregationOutput()) { + hash = (37 * hash) + AGGREGATION_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getAggregationOutput().hashCode(); + } + if (hasOutputInfo()) { + hash = (37 * hash) + OUTPUT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getOutputInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse 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 results from an evaluation run performed by the EvaluationService.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EvaluateDatasetResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.EvaluateDatasetResponse) + com.google.cloud.aiplatform.v1.EvaluateDatasetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.class, + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAggregationOutputFieldBuilder(); + internalGetOutputInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + aggregationOutput_ = null; + if (aggregationOutputBuilder_ != null) { + aggregationOutputBuilder_.dispose(); + aggregationOutputBuilder_ = null; + } + outputInfo_ = null; + if (outputInfoBuilder_ != null) { + outputInfoBuilder_.dispose(); + outputInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetResponse build() { + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetResponse buildPartial() { + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse result = + new com.google.cloud.aiplatform.v1.EvaluateDatasetResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.EvaluateDatasetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.aggregationOutput_ = + aggregationOutputBuilder_ == null + ? aggregationOutput_ + : aggregationOutputBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.outputInfo_ = outputInfoBuilder_ == null ? outputInfo_ : outputInfoBuilder_.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.aiplatform.v1.EvaluateDatasetResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.EvaluateDatasetResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.EvaluateDatasetResponse other) { + if (other == com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.getDefaultInstance()) + return this; + if (other.hasAggregationOutput()) { + mergeAggregationOutput(other.getAggregationOutput()); + } + if (other.hasOutputInfo()) { + mergeOutputInfo(other.getOutputInfo()); + } + 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( + internalGetAggregationOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage( + internalGetOutputInfoFieldBuilder().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 bitField0_; + + private com.google.cloud.aiplatform.v1.AggregationOutput aggregationOutput_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AggregationOutput, + com.google.cloud.aiplatform.v1.AggregationOutput.Builder, + com.google.cloud.aiplatform.v1.AggregationOutputOrBuilder> + aggregationOutputBuilder_; + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregationOutput field is set. + */ + public boolean hasAggregationOutput() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregationOutput. + */ + public com.google.cloud.aiplatform.v1.AggregationOutput getAggregationOutput() { + if (aggregationOutputBuilder_ == null) { + return aggregationOutput_ == null + ? com.google.cloud.aiplatform.v1.AggregationOutput.getDefaultInstance() + : aggregationOutput_; + } else { + return aggregationOutputBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAggregationOutput(com.google.cloud.aiplatform.v1.AggregationOutput value) { + if (aggregationOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregationOutput_ = value; + } else { + aggregationOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAggregationOutput( + com.google.cloud.aiplatform.v1.AggregationOutput.Builder builderForValue) { + if (aggregationOutputBuilder_ == null) { + aggregationOutput_ = builderForValue.build(); + } else { + aggregationOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAggregationOutput(com.google.cloud.aiplatform.v1.AggregationOutput value) { + if (aggregationOutputBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && aggregationOutput_ != null + && aggregationOutput_ + != com.google.cloud.aiplatform.v1.AggregationOutput.getDefaultInstance()) { + getAggregationOutputBuilder().mergeFrom(value); + } else { + aggregationOutput_ = value; + } + } else { + aggregationOutputBuilder_.mergeFrom(value); + } + if (aggregationOutput_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAggregationOutput() { + bitField0_ = (bitField0_ & ~0x00000001); + aggregationOutput_ = null; + if (aggregationOutputBuilder_ != null) { + aggregationOutputBuilder_.dispose(); + aggregationOutputBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.AggregationOutput.Builder getAggregationOutputBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAggregationOutputFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.AggregationOutputOrBuilder + getAggregationOutputOrBuilder() { + if (aggregationOutputBuilder_ != null) { + return aggregationOutputBuilder_.getMessageOrBuilder(); + } else { + return aggregationOutput_ == null + ? com.google.cloud.aiplatform.v1.AggregationOutput.getDefaultInstance() + : aggregationOutput_; + } + } + + /** + * + * + *
+     * Output only. Aggregation statistics derived from results of
+     * EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AggregationOutput, + com.google.cloud.aiplatform.v1.AggregationOutput.Builder, + com.google.cloud.aiplatform.v1.AggregationOutputOrBuilder> + internalGetAggregationOutputFieldBuilder() { + if (aggregationOutputBuilder_ == null) { + aggregationOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AggregationOutput, + com.google.cloud.aiplatform.v1.AggregationOutput.Builder, + com.google.cloud.aiplatform.v1.AggregationOutputOrBuilder>( + getAggregationOutput(), getParentForChildren(), isClean()); + aggregationOutput_ = null; + } + return aggregationOutputBuilder_; + } + + private com.google.cloud.aiplatform.v1.OutputInfo outputInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.OutputInfo, + com.google.cloud.aiplatform.v1.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.OutputInfoOrBuilder> + outputInfoBuilder_; + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + public boolean hasOutputInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + public com.google.cloud.aiplatform.v1.OutputInfo getOutputInfo() { + if (outputInfoBuilder_ == null) { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.OutputInfo.getDefaultInstance() + : outputInfo_; + } else { + return outputInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOutputInfo(com.google.cloud.aiplatform.v1.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputInfo_ = value; + } else { + outputInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOutputInfo( + com.google.cloud.aiplatform.v1.OutputInfo.Builder builderForValue) { + if (outputInfoBuilder_ == null) { + outputInfo_ = builderForValue.build(); + } else { + outputInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOutputInfo(com.google.cloud.aiplatform.v1.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && outputInfo_ != null + && outputInfo_ != com.google.cloud.aiplatform.v1.OutputInfo.getDefaultInstance()) { + getOutputInfoBuilder().mergeFrom(value); + } else { + outputInfo_ = value; + } + } else { + outputInfoBuilder_.mergeFrom(value); + } + if (outputInfo_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOutputInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + outputInfo_ = null; + if (outputInfoBuilder_ != null) { + outputInfoBuilder_.dispose(); + outputInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.OutputInfo.Builder getOutputInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetOutputInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.OutputInfoOrBuilder getOutputInfoOrBuilder() { + if (outputInfoBuilder_ != null) { + return outputInfoBuilder_.getMessageOrBuilder(); + } else { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.OutputInfo.getDefaultInstance() + : outputInfo_; + } + } + + /** + * + * + *
+     * Output only. Output info for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.OutputInfo, + com.google.cloud.aiplatform.v1.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.OutputInfoOrBuilder> + internalGetOutputInfoFieldBuilder() { + if (outputInfoBuilder_ == null) { + outputInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.OutputInfo, + com.google.cloud.aiplatform.v1.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.OutputInfoOrBuilder>( + getOutputInfo(), getParentForChildren(), isClean()); + outputInfo_ = null; + } + return outputInfoBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.EvaluateDatasetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.EvaluateDatasetResponse) + private static final com.google.cloud.aiplatform.v1.EvaluateDatasetResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.EvaluateDatasetResponse(); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluateDatasetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.EvaluateDatasetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetResponseOrBuilder.java new file mode 100644 index 000000000000..46dcfd5d33c4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetResponseOrBuilder.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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface EvaluateDatasetResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.EvaluateDatasetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Aggregation statistics derived from results of
+   * EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregationOutput field is set. + */ + boolean hasAggregationOutput(); + + /** + * + * + *
+   * Output only. Aggregation statistics derived from results of
+   * EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregationOutput. + */ + com.google.cloud.aiplatform.v1.AggregationOutput getAggregationOutput(); + + /** + * + * + *
+   * Output only. Aggregation statistics derived from results of
+   * EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AggregationOutput aggregation_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.AggregationOutputOrBuilder getAggregationOutputOrBuilder(); + + /** + * + * + *
+   * Output only. Output info for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + boolean hasOutputInfo(); + + /** + * + * + *
+   * Output only. Output info for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + com.google.cloud.aiplatform.v1.OutputInfo getOutputInfo(); + + /** + * + * + *
+   * Output only. Output info for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputInfo output_info = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.OutputInfoOrBuilder getOutputInfoOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetRun.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetRun.java new file mode 100644 index 000000000000..ee075e12ca4d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetRun.java @@ -0,0 +1,1625 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/tuning_job.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Evaluate Dataset Run Result for Tuning Job.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EvaluateDatasetRun} + */ +@com.google.protobuf.Generated +public final class EvaluateDatasetRun extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.EvaluateDatasetRun) + EvaluateDatasetRunOrBuilder { + 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= */ "", + "EvaluateDatasetRun"); + } + + // Use EvaluateDatasetRun.newBuilder() to construct. + private EvaluateDatasetRun(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EvaluateDatasetRun() { + operationName_ = ""; + evaluationRun_ = ""; + checkpointId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.class, + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder.class); + } + + private int bitField0_; + public static final int OPERATION_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object operationName_ = ""; + + /** + * + * + *
+   * Output only. Deprecated: The updated architecture uses evaluation_run
+   * instead.
+   * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @return The operationName. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getOperationName() { + java.lang.Object ref = operationName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operationName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Deprecated: The updated architecture uses evaluation_run
+   * instead.
+   * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @return The bytes for operationName. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getOperationNameBytes() { + java.lang.Object ref = operationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVALUATION_RUN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object evaluationRun_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the evaluation run. Format:
+   * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+   * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The evaluationRun. + */ + @java.lang.Override + public java.lang.String getEvaluationRun() { + java.lang.Object ref = evaluationRun_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + evaluationRun_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the evaluation run. Format:
+   * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+   * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for evaluationRun. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEvaluationRunBytes() { + java.lang.Object ref = evaluationRun_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + evaluationRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHECKPOINT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object checkpointId_ = ""; + + /** + * + * + *
+   * Output only. The checkpoint id used in the evaluation run. Only populated
+   * when evaluating checkpoints.
+   * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The checkpointId. + */ + @java.lang.Override + public java.lang.String getCheckpointId() { + java.lang.Object ref = checkpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checkpointId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The checkpoint id used in the evaluation run. Only populated
+   * when evaluating checkpoints.
+   * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for checkpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCheckpointIdBytes() { + java.lang.Object ref = checkpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + checkpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVALUATE_DATASET_RESPONSE_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluateDatasetResponse_; + + /** + * + * + *
+   * Output only. Results for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the evaluateDatasetResponse field is set. + */ + @java.lang.Override + public boolean hasEvaluateDatasetResponse() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Results for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The evaluateDatasetResponse. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetResponse getEvaluateDatasetResponse() { + return evaluateDatasetResponse_ == null + ? com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.getDefaultInstance() + : evaluateDatasetResponse_; + } + + /** + * + * + *
+   * Output only. Results for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetResponseOrBuilder + getEvaluateDatasetResponseOrBuilder() { + return evaluateDatasetResponse_ == null + ? com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.getDefaultInstance() + : evaluateDatasetResponse_; + } + + public static final int ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status error_; + + /** + * + * + *
+   * Output only. The error of the evaluation run if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The error of the evaluation run if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + /** + * + * + *
+   * Output only. The error of the evaluation run if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + 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(operationName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, operationName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(checkpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, checkpointId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getEvaluateDatasetResponse()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getError()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(evaluationRun_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, evaluationRun_); + } + 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(operationName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, operationName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(checkpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, checkpointId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEvaluateDatasetResponse()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getError()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(evaluationRun_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, evaluationRun_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.EvaluateDatasetRun)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.EvaluateDatasetRun other = + (com.google.cloud.aiplatform.v1.EvaluateDatasetRun) obj; + + if (!getOperationName().equals(other.getOperationName())) return false; + if (!getEvaluationRun().equals(other.getEvaluationRun())) return false; + if (!getCheckpointId().equals(other.getCheckpointId())) return false; + if (hasEvaluateDatasetResponse() != other.hasEvaluateDatasetResponse()) return false; + if (hasEvaluateDatasetResponse()) { + if (!getEvaluateDatasetResponse().equals(other.getEvaluateDatasetResponse())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) 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) + OPERATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOperationName().hashCode(); + hash = (37 * hash) + EVALUATION_RUN_FIELD_NUMBER; + hash = (53 * hash) + getEvaluationRun().hashCode(); + hash = (37 * hash) + CHECKPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getCheckpointId().hashCode(); + if (hasEvaluateDatasetResponse()) { + hash = (37 * hash) + EVALUATE_DATASET_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getEvaluateDatasetResponse().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.EvaluateDatasetRun 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; + } + + /** + * + * + *
+   * Evaluate Dataset Run Result for Tuning Job.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EvaluateDatasetRun} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.EvaluateDatasetRun) + com.google.cloud.aiplatform.v1.EvaluateDatasetRunOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.class, + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.EvaluateDatasetRun.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEvaluateDatasetResponseFieldBuilder(); + internalGetErrorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operationName_ = ""; + evaluationRun_ = ""; + checkpointId_ = ""; + evaluateDatasetResponse_ = null; + if (evaluateDatasetResponseBuilder_ != null) { + evaluateDatasetResponseBuilder_.dispose(); + evaluateDatasetResponseBuilder_ = null; + } + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetRun getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.EvaluateDatasetRun.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetRun build() { + com.google.cloud.aiplatform.v1.EvaluateDatasetRun result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetRun buildPartial() { + com.google.cloud.aiplatform.v1.EvaluateDatasetRun result = + new com.google.cloud.aiplatform.v1.EvaluateDatasetRun(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.EvaluateDatasetRun result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operationName_ = operationName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.evaluationRun_ = evaluationRun_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.checkpointId_ = checkpointId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.evaluateDatasetResponse_ = + evaluateDatasetResponseBuilder_ == null + ? evaluateDatasetResponse_ + : evaluateDatasetResponseBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.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.aiplatform.v1.EvaluateDatasetRun) { + return mergeFrom((com.google.cloud.aiplatform.v1.EvaluateDatasetRun) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.EvaluateDatasetRun other) { + if (other == com.google.cloud.aiplatform.v1.EvaluateDatasetRun.getDefaultInstance()) + return this; + if (!other.getOperationName().isEmpty()) { + operationName_ = other.operationName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEvaluationRun().isEmpty()) { + evaluationRun_ = other.evaluationRun_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getCheckpointId().isEmpty()) { + checkpointId_ = other.checkpointId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasEvaluateDatasetResponse()) { + mergeEvaluateDatasetResponse(other.getEvaluateDatasetResponse()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + 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: + { + operationName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + checkpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetEvaluateDatasetResponseFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + evaluationRun_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 operationName_ = ""; + + /** + * + * + *
+     * Output only. Deprecated: The updated architecture uses evaluation_run
+     * instead.
+     * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @return The operationName. + */ + @java.lang.Deprecated + public java.lang.String getOperationName() { + java.lang.Object ref = operationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Deprecated: The updated architecture uses evaluation_run
+     * instead.
+     * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @return The bytes for operationName. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getOperationNameBytes() { + java.lang.Object ref = operationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Deprecated: The updated architecture uses evaluation_run
+     * instead.
+     * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @param value The operationName to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setOperationName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operationName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Deprecated: The updated architecture uses evaluation_run
+     * instead.
+     * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearOperationName() { + operationName_ = getDefaultInstance().getOperationName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Deprecated: The updated architecture uses evaluation_run
+     * instead.
+     * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @param value The bytes for operationName to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setOperationNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operationName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object evaluationRun_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the evaluation run. Format:
+     * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+     * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The evaluationRun. + */ + public java.lang.String getEvaluationRun() { + java.lang.Object ref = evaluationRun_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + evaluationRun_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the evaluation run. Format:
+     * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+     * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for evaluationRun. + */ + public com.google.protobuf.ByteString getEvaluationRunBytes() { + java.lang.Object ref = evaluationRun_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + evaluationRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the evaluation run. Format:
+     * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+     * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The evaluationRun to set. + * @return This builder for chaining. + */ + public Builder setEvaluationRun(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + evaluationRun_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the evaluation run. Format:
+     * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+     * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEvaluationRun() { + evaluationRun_ = getDefaultInstance().getEvaluationRun(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the evaluation run. Format:
+     * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+     * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for evaluationRun to set. + * @return This builder for chaining. + */ + public Builder setEvaluationRunBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + evaluationRun_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object checkpointId_ = ""; + + /** + * + * + *
+     * Output only. The checkpoint id used in the evaluation run. Only populated
+     * when evaluating checkpoints.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The checkpointId. + */ + public java.lang.String getCheckpointId() { + java.lang.Object ref = checkpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checkpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The checkpoint id used in the evaluation run. Only populated
+     * when evaluating checkpoints.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for checkpointId. + */ + public com.google.protobuf.ByteString getCheckpointIdBytes() { + java.lang.Object ref = checkpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + checkpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The checkpoint id used in the evaluation run. Only populated
+     * when evaluating checkpoints.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The checkpointId to set. + * @return This builder for chaining. + */ + public Builder setCheckpointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + checkpointId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The checkpoint id used in the evaluation run. Only populated
+     * when evaluating checkpoints.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCheckpointId() { + checkpointId_ = getDefaultInstance().getCheckpointId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The checkpoint id used in the evaluation run. Only populated
+     * when evaluating checkpoints.
+     * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for checkpointId to set. + * @return This builder for chaining. + */ + public Builder setCheckpointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + checkpointId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluateDatasetResponse_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse, + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.Builder, + com.google.cloud.aiplatform.v1.EvaluateDatasetResponseOrBuilder> + evaluateDatasetResponseBuilder_; + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the evaluateDatasetResponse field is set. + */ + public boolean hasEvaluateDatasetResponse() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The evaluateDatasetResponse. + */ + public com.google.cloud.aiplatform.v1.EvaluateDatasetResponse getEvaluateDatasetResponse() { + if (evaluateDatasetResponseBuilder_ == null) { + return evaluateDatasetResponse_ == null + ? com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.getDefaultInstance() + : evaluateDatasetResponse_; + } else { + return evaluateDatasetResponseBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEvaluateDatasetResponse( + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse value) { + if (evaluateDatasetResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + evaluateDatasetResponse_ = value; + } else { + evaluateDatasetResponseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEvaluateDatasetResponse( + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.Builder builderForValue) { + if (evaluateDatasetResponseBuilder_ == null) { + evaluateDatasetResponse_ = builderForValue.build(); + } else { + evaluateDatasetResponseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEvaluateDatasetResponse( + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse value) { + if (evaluateDatasetResponseBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && evaluateDatasetResponse_ != null + && evaluateDatasetResponse_ + != com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.getDefaultInstance()) { + getEvaluateDatasetResponseBuilder().mergeFrom(value); + } else { + evaluateDatasetResponse_ = value; + } + } else { + evaluateDatasetResponseBuilder_.mergeFrom(value); + } + if (evaluateDatasetResponse_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEvaluateDatasetResponse() { + bitField0_ = (bitField0_ & ~0x00000008); + evaluateDatasetResponse_ = null; + if (evaluateDatasetResponseBuilder_ != null) { + evaluateDatasetResponseBuilder_.dispose(); + evaluateDatasetResponseBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.Builder + getEvaluateDatasetResponseBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetEvaluateDatasetResponseFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluateDatasetResponseOrBuilder + getEvaluateDatasetResponseOrBuilder() { + if (evaluateDatasetResponseBuilder_ != null) { + return evaluateDatasetResponseBuilder_.getMessageOrBuilder(); + } else { + return evaluateDatasetResponse_ == null + ? com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.getDefaultInstance() + : evaluateDatasetResponse_; + } + } + + /** + * + * + *
+     * Output only. Results for EvaluationService.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse, + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.Builder, + com.google.cloud.aiplatform.v1.EvaluateDatasetResponseOrBuilder> + internalGetEvaluateDatasetResponseFieldBuilder() { + if (evaluateDatasetResponseBuilder_ == null) { + evaluateDatasetResponseBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse, + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse.Builder, + com.google.cloud.aiplatform.v1.EvaluateDatasetResponseOrBuilder>( + getEvaluateDatasetResponse(), getParentForChildren(), isClean()); + evaluateDatasetResponse_ = null; + } + return evaluateDatasetResponseBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + if (error_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000010); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + + /** + * + * + *
+     * Output only. The error of the evaluation run if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.EvaluateDatasetRun) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.EvaluateDatasetRun) + private static final com.google.cloud.aiplatform.v1.EvaluateDatasetRun DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.EvaluateDatasetRun(); + } + + public static com.google.cloud.aiplatform.v1.EvaluateDatasetRun getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluateDatasetRun parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.EvaluateDatasetRun getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetRunOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetRunOrBuilder.java new file mode 100644 index 000000000000..29bdf500bad4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateDatasetRunOrBuilder.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/aiplatform/v1/tuning_job.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface EvaluateDatasetRunOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.EvaluateDatasetRun) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Deprecated: The updated architecture uses evaluation_run
+   * instead.
+   * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @return The operationName. + */ + @java.lang.Deprecated + java.lang.String getOperationName(); + + /** + * + * + *
+   * Output only. Deprecated: The updated architecture uses evaluation_run
+   * instead.
+   * 
+ * + * + * string operation_name = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @deprecated google.cloud.aiplatform.v1.EvaluateDatasetRun.operation_name is deprecated. See + * google/cloud/aiplatform/v1/tuning_job.proto;l=407 + * @return The bytes for operationName. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getOperationNameBytes(); + + /** + * + * + *
+   * Output only. The resource name of the evaluation run. Format:
+   * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+   * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The evaluationRun. + */ + java.lang.String getEvaluationRun(); + + /** + * + * + *
+   * Output only. The resource name of the evaluation run. Format:
+   * `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
+   * 
+ * + * string evaluation_run = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for evaluationRun. + */ + com.google.protobuf.ByteString getEvaluationRunBytes(); + + /** + * + * + *
+   * Output only. The checkpoint id used in the evaluation run. Only populated
+   * when evaluating checkpoints.
+   * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The checkpointId. + */ + java.lang.String getCheckpointId(); + + /** + * + * + *
+   * Output only. The checkpoint id used in the evaluation run. Only populated
+   * when evaluating checkpoints.
+   * 
+ * + * string checkpoint_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for checkpointId. + */ + com.google.protobuf.ByteString getCheckpointIdBytes(); + + /** + * + * + *
+   * Output only. Results for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the evaluateDatasetResponse field is set. + */ + boolean hasEvaluateDatasetResponse(); + + /** + * + * + *
+   * Output only. Results for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The evaluateDatasetResponse. + */ + com.google.cloud.aiplatform.v1.EvaluateDatasetResponse getEvaluateDatasetResponse(); + + /** + * + * + *
+   * Output only. Results for EvaluationService.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluateDatasetResponse evaluate_dataset_response = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.EvaluateDatasetResponseOrBuilder + getEvaluateDatasetResponseOrBuilder(); + + /** + * + * + *
+   * Output only. The error of the evaluation run if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * + * + *
+   * Output only. The error of the evaluation run if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + + /** + * + * + *
+   * Output only. The error of the evaluation run if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateInstancesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateInstancesResponse.java index 42a5a3abef03..e67d4f809771 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateInstancesResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateInstancesResponse.java @@ -51,7 +51,9 @@ private EvaluateInstancesResponse(com.google.protobuf.GeneratedMessage.Builder metricResults_; + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + @java.lang.Override + public java.util.List getMetricResultsList() { + return metricResults_; + } + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + @java.lang.Override + public java.util.List + getMetricResultsOrBuilderList() { + return metricResults_; + } + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + @java.lang.Override + public int getMetricResultsCount() { + return metricResults_.size(); + } + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MetricResult getMetricResults(int index) { + return metricResults_.get(index); + } + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MetricResultOrBuilder getMetricResultsOrBuilder(int index) { + return metricResults_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1765,6 +1853,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (evaluationResultsCase_ == 30) { output.writeMessage(30, (com.google.cloud.aiplatform.v1.MetricxResult) evaluationResults_); } + for (int i = 0; i < metricResults_.size(); i++) { + output.writeMessage(43, metricResults_.get(i)); + } getUnknownFields().writeTo(output); } @@ -1910,6 +2001,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 30, (com.google.cloud.aiplatform.v1.MetricxResult) evaluationResults_); } + for (int i = 0; i < metricResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(43, metricResults_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1926,6 +2020,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.aiplatform.v1.EvaluateInstancesResponse other = (com.google.cloud.aiplatform.v1.EvaluateInstancesResponse) obj; + if (!getMetricResultsList().equals(other.getMetricResultsList())) return false; if (!getEvaluationResultsCase().equals(other.getEvaluationResultsCase())) return false; switch (evaluationResultsCase_) { case 1: @@ -2028,6 +2123,10 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + if (getMetricResultsCount() > 0) { + hash = (37 * hash) + METRIC_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getMetricResultsList().hashCode(); + } switch (evaluationResultsCase_) { case 1: hash = (37 * hash) + EXACT_MATCH_RESULTS_FIELD_NUMBER; @@ -2348,6 +2447,13 @@ public Builder clear() { if (metricxResultBuilder_ != null) { metricxResultBuilder_.clear(); } + if (metricResultsBuilder_ == null) { + metricResults_ = java.util.Collections.emptyList(); + } else { + metricResults_ = null; + metricResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x02000000); evaluationResultsCase_ = 0; evaluationResults_ = null; return this; @@ -2377,6 +2483,7 @@ public com.google.cloud.aiplatform.v1.EvaluateInstancesResponse build() { public com.google.cloud.aiplatform.v1.EvaluateInstancesResponse buildPartial() { com.google.cloud.aiplatform.v1.EvaluateInstancesResponse result = new com.google.cloud.aiplatform.v1.EvaluateInstancesResponse(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -2385,6 +2492,19 @@ public com.google.cloud.aiplatform.v1.EvaluateInstancesResponse buildPartial() { return result; } + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.EvaluateInstancesResponse result) { + if (metricResultsBuilder_ == null) { + if (((bitField0_ & 0x02000000) != 0)) { + metricResults_ = java.util.Collections.unmodifiableList(metricResults_); + bitField0_ = (bitField0_ & ~0x02000000); + } + result.metricResults_ = metricResults_; + } else { + result.metricResults_ = metricResultsBuilder_.build(); + } + } + private void buildPartial0(com.google.cloud.aiplatform.v1.EvaluateInstancesResponse result) { int from_bitField0_ = bitField0_; } @@ -2483,6 +2603,33 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.aiplatform.v1.EvaluateInstancesResponse other) { if (other == com.google.cloud.aiplatform.v1.EvaluateInstancesResponse.getDefaultInstance()) return this; + if (metricResultsBuilder_ == null) { + if (!other.metricResults_.isEmpty()) { + if (metricResults_.isEmpty()) { + metricResults_ = other.metricResults_; + bitField0_ = (bitField0_ & ~0x02000000); + } else { + ensureMetricResultsIsMutable(); + metricResults_.addAll(other.metricResults_); + } + onChanged(); + } + } else { + if (!other.metricResults_.isEmpty()) { + if (metricResultsBuilder_.isEmpty()) { + metricResultsBuilder_.dispose(); + metricResultsBuilder_ = null; + metricResults_ = other.metricResults_; + bitField0_ = (bitField0_ & ~0x02000000); + metricResultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMetricResultsFieldBuilder() + : null; + } else { + metricResultsBuilder_.addAllMessages(other.metricResults_); + } + } + } switch (other.getEvaluationResultsCase()) { case EXACT_MATCH_RESULTS: { @@ -2827,6 +2974,19 @@ public Builder mergeFrom( evaluationResultsCase_ = 30; break; } // case 242 + case 346: + { + com.google.cloud.aiplatform.v1.MetricResult m = + input.readMessage( + com.google.cloud.aiplatform.v1.MetricResult.parser(), extensionRegistry); + if (metricResultsBuilder_ == null) { + ensureMetricResultsIsMutable(); + metricResults_.add(m); + } else { + metricResultsBuilder_.addMessage(m); + } + break; + } // case 346 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -8753,6 +8913,414 @@ public com.google.cloud.aiplatform.v1.MetricxResultOrBuilder getMetricxResultOrB return metricxResultBuilder_; } + private java.util.List metricResults_ = + java.util.Collections.emptyList(); + + private void ensureMetricResultsIsMutable() { + if (!((bitField0_ & 0x02000000) != 0)) { + metricResults_ = + new java.util.ArrayList(metricResults_); + bitField0_ |= 0x02000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.MetricResult, + com.google.cloud.aiplatform.v1.MetricResult.Builder, + com.google.cloud.aiplatform.v1.MetricResultOrBuilder> + metricResultsBuilder_; + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public java.util.List getMetricResultsList() { + if (metricResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metricResults_); + } else { + return metricResultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public int getMetricResultsCount() { + if (metricResultsBuilder_ == null) { + return metricResults_.size(); + } else { + return metricResultsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public com.google.cloud.aiplatform.v1.MetricResult getMetricResults(int index) { + if (metricResultsBuilder_ == null) { + return metricResults_.get(index); + } else { + return metricResultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder setMetricResults(int index, com.google.cloud.aiplatform.v1.MetricResult value) { + if (metricResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricResultsIsMutable(); + metricResults_.set(index, value); + onChanged(); + } else { + metricResultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder setMetricResults( + int index, com.google.cloud.aiplatform.v1.MetricResult.Builder builderForValue) { + if (metricResultsBuilder_ == null) { + ensureMetricResultsIsMutable(); + metricResults_.set(index, builderForValue.build()); + onChanged(); + } else { + metricResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder addMetricResults(com.google.cloud.aiplatform.v1.MetricResult value) { + if (metricResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricResultsIsMutable(); + metricResults_.add(value); + onChanged(); + } else { + metricResultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder addMetricResults(int index, com.google.cloud.aiplatform.v1.MetricResult value) { + if (metricResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricResultsIsMutable(); + metricResults_.add(index, value); + onChanged(); + } else { + metricResultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder addMetricResults( + com.google.cloud.aiplatform.v1.MetricResult.Builder builderForValue) { + if (metricResultsBuilder_ == null) { + ensureMetricResultsIsMutable(); + metricResults_.add(builderForValue.build()); + onChanged(); + } else { + metricResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder addMetricResults( + int index, com.google.cloud.aiplatform.v1.MetricResult.Builder builderForValue) { + if (metricResultsBuilder_ == null) { + ensureMetricResultsIsMutable(); + metricResults_.add(index, builderForValue.build()); + onChanged(); + } else { + metricResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder addAllMetricResults( + java.lang.Iterable values) { + if (metricResultsBuilder_ == null) { + ensureMetricResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metricResults_); + onChanged(); + } else { + metricResultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder clearMetricResults() { + if (metricResultsBuilder_ == null) { + metricResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x02000000); + onChanged(); + } else { + metricResultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public Builder removeMetricResults(int index) { + if (metricResultsBuilder_ == null) { + ensureMetricResultsIsMutable(); + metricResults_.remove(index); + onChanged(); + } else { + metricResultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public com.google.cloud.aiplatform.v1.MetricResult.Builder getMetricResultsBuilder(int index) { + return internalGetMetricResultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public com.google.cloud.aiplatform.v1.MetricResultOrBuilder getMetricResultsOrBuilder( + int index) { + if (metricResultsBuilder_ == null) { + return metricResults_.get(index); + } else { + return metricResultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public java.util.List + getMetricResultsOrBuilderList() { + if (metricResultsBuilder_ != null) { + return metricResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metricResults_); + } + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public com.google.cloud.aiplatform.v1.MetricResult.Builder addMetricResultsBuilder() { + return internalGetMetricResultsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.MetricResult.getDefaultInstance()); + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public com.google.cloud.aiplatform.v1.MetricResult.Builder addMetricResultsBuilder(int index) { + return internalGetMetricResultsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.MetricResult.getDefaultInstance()); + } + + /** + * + * + *
+     * Metric results for each instance.
+     * The order of the metric results is guaranteed to be the same as the order
+     * of the instances in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + public java.util.List + getMetricResultsBuilderList() { + return internalGetMetricResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.MetricResult, + com.google.cloud.aiplatform.v1.MetricResult.Builder, + com.google.cloud.aiplatform.v1.MetricResultOrBuilder> + internalGetMetricResultsFieldBuilder() { + if (metricResultsBuilder_ == null) { + metricResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.MetricResult, + com.google.cloud.aiplatform.v1.MetricResult.Builder, + com.google.cloud.aiplatform.v1.MetricResultOrBuilder>( + metricResults_, + ((bitField0_ & 0x02000000) != 0), + getParentForChildren(), + isClean()); + metricResults_ = null; + } + return metricResultsBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.EvaluateInstancesResponse) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateInstancesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateInstancesResponseOrBuilder.java index a5d75e358737..bee864bcf299 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateInstancesResponseOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluateInstancesResponseOrBuilder.java @@ -1054,6 +1054,72 @@ public interface EvaluateInstancesResponseOrBuilder */ com.google.cloud.aiplatform.v1.MetricxResultOrBuilder getMetricxResultOrBuilder(); + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + java.util.List getMetricResultsList(); + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + com.google.cloud.aiplatform.v1.MetricResult getMetricResults(int index); + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + int getMetricResultsCount(); + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + java.util.List + getMetricResultsOrBuilderList(); + + /** + * + * + *
+   * Metric results for each instance.
+   * The order of the metric results is guaranteed to be the same as the order
+   * of the instances in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MetricResult metric_results = 43; + */ + com.google.cloud.aiplatform.v1.MetricResultOrBuilder getMetricResultsOrBuilder(int index); + com.google.cloud.aiplatform.v1.EvaluateInstancesResponse.EvaluationResultsCase getEvaluationResultsCase(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationConfig.java new file mode 100644 index 000000000000..0d4d29fb3fc3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationConfig.java @@ -0,0 +1,1925 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/tuning_job.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Evaluation Config for Tuning Job.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EvaluationConfig} + */ +@com.google.protobuf.Generated +public final class EvaluationConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.EvaluationConfig) + EvaluationConfigOrBuilder { + 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= */ "", + "EvaluationConfig"); + } + + // Use EvaluationConfig.newBuilder() to construct. + private EvaluationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EvaluationConfig() { + metrics_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EvaluationConfig.class, + com.google.cloud.aiplatform.v1.EvaluationConfig.Builder.class); + } + + private int bitField0_; + public static final int METRICS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List metrics_; + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getMetricsList() { + return metrics_; + } + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMetricsOrBuilderList() { + return metrics_; + } + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Metric getMetrics(int index) { + return metrics_.get(index); + } + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MetricOrBuilder getMetricsOrBuilder(int index) { + return metrics_.get(index); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.OutputConfig outputConfig_; + + /** + * + * + *
+   * Required. Config for evaluation output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Config for evaluation output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + + /** + * + * + *
+   * Required. Config for evaluation output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + + public static final int AUTORATER_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.AutoraterConfig autoraterConfig_; + + /** + * + * + *
+   * Optional. Autorater config for evaluation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoraterConfig field is set. + */ + @java.lang.Override + public boolean hasAutoraterConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Autorater config for evaluation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoraterConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutoraterConfig getAutoraterConfig() { + return autoraterConfig_ == null + ? com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance() + : autoraterConfig_; + } + + /** + * + * + *
+   * Optional. Autorater config for evaluation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder getAutoraterConfigOrBuilder() { + return autoraterConfig_ == null + ? com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance() + : autoraterConfig_; + } + + public static final int INFERENCE_GENERATION_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.GenerationConfig inferenceGenerationConfig_; + + /** + * + * + *
+   * Optional. Configuration options for inference generation and outputs.
+   * If not set, default generation parameters are used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inferenceGenerationConfig field is set. + */ + @java.lang.Override + public boolean hasInferenceGenerationConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Configuration options for inference generation and outputs.
+   * If not set, default generation parameters are used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inferenceGenerationConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenerationConfig getInferenceGenerationConfig() { + return inferenceGenerationConfig_ == null + ? com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance() + : inferenceGenerationConfig_; + } + + /** + * + * + *
+   * Optional. Configuration options for inference generation and outputs.
+   * If not set, default generation parameters are used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder + getInferenceGenerationConfigOrBuilder() { + return inferenceGenerationConfig_ == null + ? com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance() + : inferenceGenerationConfig_; + } + + 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 < metrics_.size(); i++) { + output.writeMessage(1, metrics_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getOutputConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getAutoraterConfig()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getInferenceGenerationConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metrics_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutputConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAutoraterConfig()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getInferenceGenerationConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.EvaluationConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.EvaluationConfig other = + (com.google.cloud.aiplatform.v1.EvaluationConfig) obj; + + if (!getMetricsList().equals(other.getMetricsList())) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig().equals(other.getOutputConfig())) return false; + } + if (hasAutoraterConfig() != other.hasAutoraterConfig()) return false; + if (hasAutoraterConfig()) { + if (!getAutoraterConfig().equals(other.getAutoraterConfig())) return false; + } + if (hasInferenceGenerationConfig() != other.hasInferenceGenerationConfig()) return false; + if (hasInferenceGenerationConfig()) { + if (!getInferenceGenerationConfig().equals(other.getInferenceGenerationConfig())) + 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 (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + if (hasAutoraterConfig()) { + hash = (37 * hash) + AUTORATER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAutoraterConfig().hashCode(); + } + if (hasInferenceGenerationConfig()) { + hash = (37 * hash) + INFERENCE_GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInferenceGenerationConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.EvaluationConfig 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; + } + + /** + * + * + *
+   * Evaluation Config for Tuning Job.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EvaluationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.EvaluationConfig) + com.google.cloud.aiplatform.v1.EvaluationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EvaluationConfig.class, + com.google.cloud.aiplatform.v1.EvaluationConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.EvaluationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMetricsFieldBuilder(); + internalGetOutputConfigFieldBuilder(); + internalGetAutoraterConfigFieldBuilder(); + internalGetInferenceGenerationConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + } else { + metrics_ = null; + metricsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + outputConfig_ = null; + if (outputConfigBuilder_ != null) { + outputConfigBuilder_.dispose(); + outputConfigBuilder_ = null; + } + autoraterConfig_ = null; + if (autoraterConfigBuilder_ != null) { + autoraterConfigBuilder_.dispose(); + autoraterConfigBuilder_ = null; + } + inferenceGenerationConfig_ = null; + if (inferenceGenerationConfigBuilder_ != null) { + inferenceGenerationConfigBuilder_.dispose(); + inferenceGenerationConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_EvaluationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.EvaluationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationConfig build() { + com.google.cloud.aiplatform.v1.EvaluationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationConfig buildPartial() { + com.google.cloud.aiplatform.v1.EvaluationConfig result = + new com.google.cloud.aiplatform.v1.EvaluationConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.EvaluationConfig result) { + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.EvaluationConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.outputConfig_ = + outputConfigBuilder_ == null ? outputConfig_ : outputConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.autoraterConfig_ = + autoraterConfigBuilder_ == null ? autoraterConfig_ : autoraterConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.inferenceGenerationConfig_ = + inferenceGenerationConfigBuilder_ == null + ? inferenceGenerationConfig_ + : inferenceGenerationConfigBuilder_.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.aiplatform.v1.EvaluationConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.EvaluationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.EvaluationConfig other) { + if (other == com.google.cloud.aiplatform.v1.EvaluationConfig.getDefaultInstance()) + return this; + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + metricsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + if (other.hasAutoraterConfig()) { + mergeAutoraterConfig(other.getAutoraterConfig()); + } + if (other.hasInferenceGenerationConfig()) { + mergeInferenceGenerationConfig(other.getInferenceGenerationConfig()); + } + 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.aiplatform.v1.Metric m = + input.readMessage( + com.google.cloud.aiplatform.v1.Metric.parser(), extensionRegistry); + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(m); + } else { + metricsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetAutoraterConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + input.readMessage( + internalGetInferenceGenerationConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + 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.util.List metrics_ = + java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metrics_ = new java.util.ArrayList(metrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.Metric, + com.google.cloud.aiplatform.v1.Metric.Builder, + com.google.cloud.aiplatform.v1.MetricOrBuilder> + metricsBuilder_; + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Metric getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMetrics(int index, com.google.cloud.aiplatform.v1.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMetrics( + int index, com.google.cloud.aiplatform.v1.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMetrics(com.google.cloud.aiplatform.v1.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMetrics(int index, com.google.cloud.aiplatform.v1.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMetrics(com.google.cloud.aiplatform.v1.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMetrics( + int index, com.google.cloud.aiplatform.v1.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllMetrics( + java.lang.Iterable values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Metric.Builder getMetricsBuilder(int index) { + return internalGetMetricsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.MetricOrBuilder getMetricsOrBuilder(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Metric.Builder addMetricsBuilder() { + return internalGetMetricsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Metric.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Metric.Builder addMetricsBuilder(int index) { + return internalGetMetricsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Metric.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The metrics used for evaluation.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getMetricsBuilderList() { + return internalGetMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.Metric, + com.google.cloud.aiplatform.v1.Metric.Builder, + com.google.cloud.aiplatform.v1.MetricOrBuilder> + internalGetMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.Metric, + com.google.cloud.aiplatform.v1.Metric.Builder, + com.google.cloud.aiplatform.v1.MetricOrBuilder>( + metrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private com.google.cloud.aiplatform.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.OutputConfig, + com.google.cloud.aiplatform.v1.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.OutputConfigOrBuilder> + outputConfigBuilder_; + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + public com.google.cloud.aiplatform.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig(com.google.cloud.aiplatform.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + } else { + outputConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.aiplatform.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOutputConfig(com.google.cloud.aiplatform.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && outputConfig_ != null + && outputConfig_ != com.google.cloud.aiplatform.v1.OutputConfig.getDefaultInstance()) { + getOutputConfigBuilder().mergeFrom(value); + } else { + outputConfig_ = value; + } + } else { + outputConfigBuilder_.mergeFrom(value); + } + if (outputConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOutputConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + outputConfig_ = null; + if (outputConfigBuilder_ != null) { + outputConfigBuilder_.dispose(); + outputConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.OutputConfig.Builder getOutputConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetOutputConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + } + + /** + * + * + *
+     * Required. Config for evaluation output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.OutputConfig, + com.google.cloud.aiplatform.v1.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.OutputConfigOrBuilder> + internalGetOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.OutputConfig, + com.google.cloud.aiplatform.v1.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.OutputConfigOrBuilder>( + getOutputConfig(), getParentForChildren(), isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + private com.google.cloud.aiplatform.v1.AutoraterConfig autoraterConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AutoraterConfig, + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder, + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder> + autoraterConfigBuilder_; + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoraterConfig field is set. + */ + public boolean hasAutoraterConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoraterConfig. + */ + public com.google.cloud.aiplatform.v1.AutoraterConfig getAutoraterConfig() { + if (autoraterConfigBuilder_ == null) { + return autoraterConfig_ == null + ? com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance() + : autoraterConfig_; + } else { + return autoraterConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAutoraterConfig(com.google.cloud.aiplatform.v1.AutoraterConfig value) { + if (autoraterConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoraterConfig_ = value; + } else { + autoraterConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAutoraterConfig( + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder builderForValue) { + if (autoraterConfigBuilder_ == null) { + autoraterConfig_ = builderForValue.build(); + } else { + autoraterConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAutoraterConfig(com.google.cloud.aiplatform.v1.AutoraterConfig value) { + if (autoraterConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && autoraterConfig_ != null + && autoraterConfig_ + != com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance()) { + getAutoraterConfigBuilder().mergeFrom(value); + } else { + autoraterConfig_ = value; + } + } else { + autoraterConfigBuilder_.mergeFrom(value); + } + if (autoraterConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAutoraterConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + autoraterConfig_ = null; + if (autoraterConfigBuilder_ != null) { + autoraterConfigBuilder_.dispose(); + autoraterConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.AutoraterConfig.Builder getAutoraterConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetAutoraterConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder getAutoraterConfigOrBuilder() { + if (autoraterConfigBuilder_ != null) { + return autoraterConfigBuilder_.getMessageOrBuilder(); + } else { + return autoraterConfig_ == null + ? com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance() + : autoraterConfig_; + } + } + + /** + * + * + *
+     * Optional. Autorater config for evaluation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AutoraterConfig, + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder, + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder> + internalGetAutoraterConfigFieldBuilder() { + if (autoraterConfigBuilder_ == null) { + autoraterConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AutoraterConfig, + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder, + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder>( + getAutoraterConfig(), getParentForChildren(), isClean()); + autoraterConfig_ = null; + } + return autoraterConfigBuilder_; + } + + private com.google.cloud.aiplatform.v1.GenerationConfig inferenceGenerationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GenerationConfig, + com.google.cloud.aiplatform.v1.GenerationConfig.Builder, + com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder> + inferenceGenerationConfigBuilder_; + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inferenceGenerationConfig field is set. + */ + public boolean hasInferenceGenerationConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inferenceGenerationConfig. + */ + public com.google.cloud.aiplatform.v1.GenerationConfig getInferenceGenerationConfig() { + if (inferenceGenerationConfigBuilder_ == null) { + return inferenceGenerationConfig_ == null + ? com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance() + : inferenceGenerationConfig_; + } else { + return inferenceGenerationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInferenceGenerationConfig( + com.google.cloud.aiplatform.v1.GenerationConfig value) { + if (inferenceGenerationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inferenceGenerationConfig_ = value; + } else { + inferenceGenerationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInferenceGenerationConfig( + com.google.cloud.aiplatform.v1.GenerationConfig.Builder builderForValue) { + if (inferenceGenerationConfigBuilder_ == null) { + inferenceGenerationConfig_ = builderForValue.build(); + } else { + inferenceGenerationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInferenceGenerationConfig( + com.google.cloud.aiplatform.v1.GenerationConfig value) { + if (inferenceGenerationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && inferenceGenerationConfig_ != null + && inferenceGenerationConfig_ + != com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance()) { + getInferenceGenerationConfigBuilder().mergeFrom(value); + } else { + inferenceGenerationConfig_ = value; + } + } else { + inferenceGenerationConfigBuilder_.mergeFrom(value); + } + if (inferenceGenerationConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInferenceGenerationConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + inferenceGenerationConfig_ = null; + if (inferenceGenerationConfigBuilder_ != null) { + inferenceGenerationConfigBuilder_.dispose(); + inferenceGenerationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.GenerationConfig.Builder + getInferenceGenerationConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetInferenceGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder + getInferenceGenerationConfigOrBuilder() { + if (inferenceGenerationConfigBuilder_ != null) { + return inferenceGenerationConfigBuilder_.getMessageOrBuilder(); + } else { + return inferenceGenerationConfig_ == null + ? com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance() + : inferenceGenerationConfig_; + } + } + + /** + * + * + *
+     * Optional. Configuration options for inference generation and outputs.
+     * If not set, default generation parameters are used.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GenerationConfig, + com.google.cloud.aiplatform.v1.GenerationConfig.Builder, + com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder> + internalGetInferenceGenerationConfigFieldBuilder() { + if (inferenceGenerationConfigBuilder_ == null) { + inferenceGenerationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GenerationConfig, + com.google.cloud.aiplatform.v1.GenerationConfig.Builder, + com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder>( + getInferenceGenerationConfig(), getParentForChildren(), isClean()); + inferenceGenerationConfig_ = null; + } + return inferenceGenerationConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.EvaluationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.EvaluationConfig) + private static final com.google.cloud.aiplatform.v1.EvaluationConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.EvaluationConfig(); + } + + public static com.google.cloud.aiplatform.v1.EvaluationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.EvaluationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationConfigOrBuilder.java new file mode 100644 index 000000000000..703bcd55d062 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationConfigOrBuilder.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/tuning_job.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface EvaluationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.EvaluationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getMetricsList(); + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.Metric getMetrics(int index); + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getMetricsCount(); + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getMetricsOrBuilderList(); + + /** + * + * + *
+   * Required. The metrics used for evaluation.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.MetricOrBuilder getMetricsOrBuilder(int index); + + /** + * + * + *
+   * Required. Config for evaluation output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + + /** + * + * + *
+   * Required. Config for evaluation output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + com.google.cloud.aiplatform.v1.OutputConfig getOutputConfig(); + + /** + * + * + *
+   * Required. Config for evaluation output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Autorater config for evaluation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoraterConfig field is set. + */ + boolean hasAutoraterConfig(); + + /** + * + * + *
+   * Optional. Autorater config for evaluation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoraterConfig. + */ + com.google.cloud.aiplatform.v1.AutoraterConfig getAutoraterConfig(); + + /** + * + * + *
+   * Optional. Autorater config for evaluation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AutoraterConfig autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder getAutoraterConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Configuration options for inference generation and outputs.
+   * If not set, default generation parameters are used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inferenceGenerationConfig field is set. + */ + boolean hasInferenceGenerationConfig(); + + /** + * + * + *
+   * Optional. Configuration options for inference generation and outputs.
+   * If not set, default generation parameters are used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inferenceGenerationConfig. + */ + com.google.cloud.aiplatform.v1.GenerationConfig getInferenceGenerationConfig(); + + /** + * + * + *
+   * Optional. Configuration options for inference generation and outputs.
+   * If not set, default generation parameters are used.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.GenerationConfig inference_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.GenerationConfigOrBuilder getInferenceGenerationConfigOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationDataset.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationDataset.java new file mode 100644 index 000000000000..793fbb45fd1f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationDataset.java @@ -0,0 +1,1114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The dataset used for evaluation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EvaluationDataset} + */ +@com.google.protobuf.Generated +public final class EvaluationDataset extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.EvaluationDataset) + EvaluationDatasetOrBuilder { + 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= */ "", + "EvaluationDataset"); + } + + // Use EvaluationDataset.newBuilder() to construct. + private EvaluationDataset(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EvaluationDataset() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluationDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluationDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EvaluationDataset.class, + com.google.cloud.aiplatform.v1.EvaluationDataset.Builder.class); + } + + 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 { + GCS_SOURCE(1), + BIGQUERY_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 1: + return GCS_SOURCE; + case 2: + return BIGQUERY_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 GCS_SOURCE_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Cloud storage source holds the dataset. Currently only one Cloud Storage
+   * file path is supported.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + + /** + * + * + *
+   * Cloud storage source holds the dataset. Currently only one Cloud Storage
+   * file path is supported.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource getGcsSource() { + if (sourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + + /** + * + * + *
+   * Cloud storage source holds the dataset. Currently only one Cloud Storage
+   * file path is supported.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + + public static final int BIGQUERY_SOURCE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * BigQuery source holds the dataset.
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 2; + } + + /** + * + * + *
+   * BigQuery source holds the dataset.
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySource getBigquerySource() { + if (sourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + + /** + * + * + *
+   * BigQuery source holds the dataset.
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.BigQuerySource.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 (sourceCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1.GcsSource) source_); + } + if (sourceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1.BigQuerySource) source_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1.GcsSource) source_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.BigQuerySource) 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.aiplatform.v1.EvaluationDataset)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.EvaluationDataset other = + (com.google.cloud.aiplatform.v1.EvaluationDataset) obj; + + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 2: + if (!getBigquerySource().equals(other.getBigquerySource())) 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 (sourceCase_) { + case 1: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 2: + hash = (37 * hash) + BIGQUERY_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getBigquerySource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.EvaluationDataset 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 dataset used for evaluation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EvaluationDataset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.EvaluationDataset) + com.google.cloud.aiplatform.v1.EvaluationDatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluationDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluationDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EvaluationDataset.class, + com.google.cloud.aiplatform.v1.EvaluationDataset.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.EvaluationDataset.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (bigquerySourceBuilder_ != null) { + bigquerySourceBuilder_.clear(); + } + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_EvaluationDataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationDataset getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.EvaluationDataset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationDataset build() { + com.google.cloud.aiplatform.v1.EvaluationDataset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationDataset buildPartial() { + com.google.cloud.aiplatform.v1.EvaluationDataset result = + new com.google.cloud.aiplatform.v1.EvaluationDataset(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.EvaluationDataset result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.EvaluationDataset result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 1 && gcsSourceBuilder_ != null) { + result.source_ = gcsSourceBuilder_.build(); + } + if (sourceCase_ == 2 && bigquerySourceBuilder_ != null) { + result.source_ = bigquerySourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.EvaluationDataset) { + return mergeFrom((com.google.cloud.aiplatform.v1.EvaluationDataset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.EvaluationDataset other) { + if (other == com.google.cloud.aiplatform.v1.EvaluationDataset.getDefaultInstance()) + return this; + switch (other.getSourceCase()) { + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case BIGQUERY_SOURCE: + { + mergeBigquerySource(other.getBigquerySource()); + 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: + { + input.readMessage( + internalGetGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetBigquerySourceFieldBuilder().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.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder> + gcsSourceBuilder_; + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.aiplatform.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.aiplatform.v1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.aiplatform.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1 + && source_ != com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1.GcsSource.newBuilder( + (com.google.cloud.aiplatform.v1.GcsSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + gcsSourceBuilder_.mergeFrom(value); + } else { + gcsSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 1; + return this; + } + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.aiplatform.v1.GcsSource.Builder getGcsSourceBuilder() { + return internalGetGcsSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Cloud storage source holds the dataset. Currently only one Cloud Storage
+     * file path is supported.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder> + internalGetGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder>( + (com.google.cloud.aiplatform.v1.GcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged(); + return gcsSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder> + bigquerySourceBuilder_; + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 2; + } + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySource getBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return bigquerySourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + public Builder setBigquerySource(com.google.cloud.aiplatform.v1.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + public Builder setBigquerySource( + com.google.cloud.aiplatform.v1.BigQuerySource.Builder builderForValue) { + if (bigquerySourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + public Builder mergeBigquerySource(com.google.cloud.aiplatform.v1.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ != com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1.BigQuerySource.newBuilder( + (com.google.cloud.aiplatform.v1.BigQuerySource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + bigquerySourceBuilder_.mergeFrom(value); + } else { + bigquerySourceBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + public Builder clearBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + bigquerySourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + public com.google.cloud.aiplatform.v1.BigQuerySource.Builder getBigquerySourceBuilder() { + return internalGetBigquerySourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder() { + if ((sourceCase_ == 2) && (bigquerySourceBuilder_ != null)) { + return bigquerySourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * BigQuery source holds the dataset.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder> + internalGetBigquerySourceFieldBuilder() { + if (bigquerySourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + bigquerySourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder>( + (com.google.cloud.aiplatform.v1.BigQuerySource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + return bigquerySourceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.EvaluationDataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.EvaluationDataset) + private static final com.google.cloud.aiplatform.v1.EvaluationDataset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.EvaluationDataset(); + } + + public static com.google.cloud.aiplatform.v1.EvaluationDataset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluationDataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.EvaluationDataset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationDatasetOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationDatasetOrBuilder.java new file mode 100644 index 000000000000..2a9ac1ede15b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationDatasetOrBuilder.java @@ -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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface EvaluationDatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.EvaluationDataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud storage source holds the dataset. Currently only one Cloud Storage
+   * file path is supported.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + + /** + * + * + *
+   * Cloud storage source holds the dataset. Currently only one Cloud Storage
+   * file path is supported.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return The gcsSource. + */ + com.google.cloud.aiplatform.v1.GcsSource getGcsSource(); + + /** + * + * + *
+   * Cloud storage source holds the dataset. Currently only one Cloud Storage
+   * file path is supported.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+   * BigQuery source holds the dataset.
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + * + * @return Whether the bigquerySource field is set. + */ + boolean hasBigquerySource(); + + /** + * + * + *
+   * BigQuery source holds the dataset.
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + * + * @return The bigquerySource. + */ + com.google.cloud.aiplatform.v1.BigQuerySource getBigquerySource(); + + /** + * + * + *
+   * BigQuery source holds the dataset.
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 2; + */ + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder(); + + com.google.cloud.aiplatform.v1.EvaluationDataset.SourceCase getSourceCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationServiceProto.java index bea1498179ed..a78ffe35a242 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EvaluationServiceProto.java @@ -44,10 +44,58 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_EvaluateInstancesRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_EvaluateInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Metric_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Metric_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_AutoraterConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_AutoraterConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_EvaluateInstancesResponse_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_EvaluateInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MetricResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MetricResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_OutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_EvaluationDataset_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_EvaluationDataset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_OutputInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_OutputInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_AggregationOutput_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_AggregationOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_AggregationResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_AggregationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_ExactMatchInput_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -344,10 +392,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_PointwiseMetricSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_PointwiseMetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_PointwiseMetricResult_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_PointwiseMetricResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CustomOutput_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CustomOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_RawOutput_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_RawOutput_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_PairwiseMetricInput_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -476,6 +536,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_MetricxResult_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_MetricxResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ContentMap_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ContentMap_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ContentMap_ValuesEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ContentMap_ValuesEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -488,40 +560,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n" + "3google/cloud/aiplatform/v1/evaluation_service.proto\022\032google.cloud.aiplatform.v" + "1\032\034google/api/annotations.proto\032\027google/" - + "api/client.proto\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\"\332\021\n" + + "api/client.proto\032\037google/api/field_behav" + + "ior.proto\032\031google/api/resource.proto\032(go" + + "ogle/cloud/aiplatform/v1/content.proto\032#" + + "google/cloud/aiplatform/v1/io.proto\032\034goo" + + "gle/protobuf/struct.proto\032\027google/rpc/status.proto\"\332\021\n" + "\030EvaluateInstancesRequest\022H\n" + "\021exact_match_input\030\002" + " \001(\0132+.google.cloud.aiplatform.v1.ExactMatchInputH\000\022;\n\n" + "bleu_input\030\003 \001(\0132%.google.cloud.aiplatform.v1.BleuInputH\000\022=\n" - + "\013rouge_input\030\004" - + " \001(\0132&.google.cloud.aiplatform.v1.RougeInputH\000\022A\n\r" + + "\013rouge_input\030\004 \001(\0132&.google.cloud.aiplatform.v1.RougeInputH\000\022A\n" + + "\r" + "fluency_input\030\005 \001(\0132(.google.cloud.aiplatform.v1.FluencyInputH\000\022E\n" - + "\017coherence_input\030\006 \001(\0132*.go" - + "ogle.cloud.aiplatform.v1.CoherenceInputH\000\022?\n" - + "\014safety_input\030\010" - + " \001(\0132\'.google.cloud.aiplatform.v1.SafetyInputH\000\022K\n" + + "\017coherence_input\030\006" + + " \001(\0132*.google.cloud.aiplatform.v1.CoherenceInputH\000\022?\n" + + "\014safety_input\030\010 \001(\0132\'." + + "google.cloud.aiplatform.v1.SafetyInputH\000\022K\n" + "\022groundedness_input\030\t" + " \001(\0132-.google.cloud.aiplatform.v1.GroundednessInputH\000\022I\n" + "\021fulfillment_input\030\014" + " \001(\0132,.google.cloud.aiplatform.v1.FulfillmentInputH\000\022\\\n" - + "\033summarization_quality_input\030\007" - + " \001(\01325.google.cloud.aiplatform.v1.SummarizationQualityInputH\000\022m\n" - + "$pairwise_summarization_quality_input\030\027 \001(\0132=" - + ".google.cloud.aiplatform.v1.PairwiseSummarizationQualityInputH\000\022d\n" - + "\037summarization_helpfulness_input\030\016 \001(\01329.google.cloud." - + "aiplatform.v1.SummarizationHelpfulnessInputH\000\022`\n" + + "\033summarization_quality_input\030\007 \001(\01325.google.c" + + "loud.aiplatform.v1.SummarizationQualityInputH\000\022m\n" + + "$pairwise_summarization_quality_input\030\027" + + " \001(\0132=.google.cloud.aiplatform.v1.PairwiseSummarizationQualityInputH\000\022d\n" + + "\037summarization_helpfulness_input\030\016 \001(\01329" + + ".google.cloud.aiplatform.v1.SummarizationHelpfulnessInputH\000\022`\n" + "\035summarization_verbosity_input\030\017" + " \001(\01327.google.cloud.aiplatform.v1.SummarizationVerbosityInputH\000\022e\n" + " question_answering_quality_input\030\n" + " \001(\01329.google.cloud.aiplatform.v1.QuestionAnsweringQualityInputH\000\022v\n" - + ")pairwise_question_answering_quality_input\030\030 \001(\0132A.google.cloud.aiplatf" - + "orm.v1.PairwiseQuestionAnsweringQualityInputH\000\022i\n" - + "\"question_answering_relevance_input\030\020" - + " \001(\0132;.google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInputH\000\022m\n" - + "$question_answering_helpfulness_input\030\021 \001(\0132" - + "=.google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInputH\000\022m\n" - + "$question_answering_correctness_input\030\022 \001(\0132=.google." - + "cloud.aiplatform.v1.QuestionAnsweringCorrectnessInputH\000\022R\n" + + ")pairwise_question_answering_quality_input\030\030 \001(\0132A.google" + + ".cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInputH\000\022i\n" + + "\"question_answering_relevance_input\030\020 \001(\0132;.google.cloud." + + "aiplatform.v1.QuestionAnsweringRelevanceInputH\000\022m\n" + + "$question_answering_helpfulness_input\030\021 \001(\0132=.google.cloud.aiplatform." + + "v1.QuestionAnsweringHelpfulnessInputH\000\022m\n" + + "$question_answering_correctness_input\030\022" + + " \001(\0132=.google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInputH\000\022R\n" + "\026pointwise_metric_input\030\034" + " \001(\01320.google.cloud.aiplatform.v1.PointwiseMetricInputH\000\022P\n" + "\025pairwise_metric_input\030\035" @@ -530,66 +606,180 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132..google.cloud.aiplatform.v1.ToolCallValidInputH\000\022O\n" + "\025tool_name_match_input\030\024" + " \001(\0132..google.cloud.aiplatform.v1.ToolNameMatchInputH\000\022`\n" - + "\036tool_parameter_key_match_input\030\025 \001(\01326.google.cloud.a" - + "iplatform.v1.ToolParameterKeyMatchInputH\000\022^\n" - + "\035tool_parameter_kv_match_input\030\026 \001(\013" - + "25.google.cloud.aiplatform.v1.ToolParameterKVMatchInputH\000\022=\n" - + "\013comet_input\030\037 \001(\0132&" - + ".google.cloud.aiplatform.v1.CometInputH\000\022A\n\r" + + "\036tool_parameter_key_match_input\030\025 \001(\01326." + + "google.cloud.aiplatform.v1.ToolParameterKeyMatchInputH\000\022^\n" + + "\035tool_parameter_kv_match_input\030\026" + + " \001(\01325.google.cloud.aiplatform.v1.ToolParameterKVMatchInputH\000\022=\n" + + "\013comet_input\030\037" + + " \001(\0132&.google.cloud.aiplatform.v1.CometInputH\000\022A\n\r" + "metricx_input\030 \001(\0132(.google.cloud.aiplatform.v1.MetricxInputH\000\022;\n" + "\010location\030\001 \001(\tB)\340A\002\372A#\n" + "!locations.googleapis.com/LocationB\017\n\r" - + "metric_inputs\"\343\021\n" + + "metric_inputs\"\260\007\n" + + "\006Metric\022R\n" + + "\026predefined_metric_spec\030\010 \001" + + "(\01320.google.cloud.aiplatform.v1.PredefinedMetricSpecH\000\022_\n" + + "\035computation_based_metric_spec\030\t" + + " \001(\01326.google.cloud.aiplatform.v1.ComputationBasedMetricSpecH\000\022O\n" + + "\025llm_based_metric_spec\030\n" + + " \001(\0132..google.cloud.aiplatform.v1.LLMBasedMetricSpecH\000\022P\n" + + "\025pointwise_metric_spec\030\002" + + " \001(\0132/.google.cloud.aiplatform.v1.PointwiseMetricSpecH\000\022N\n" + + "\024pairwise_metric_spec\030\003" + + " \001(\0132..google.cloud.aiplatform.v1.PairwiseMetricSpecH\000\022F\n" + + "\020exact_match_spec\030\004" + + " \001(\0132*.google.cloud.aiplatform.v1.ExactMatchSpecH\000\0229\n" + + "\tbleu_spec\030\005 \001(\0132$.google.cloud.aiplatform.v1.BleuSpecH\000\022;\n\n" + + "rouge_spec\030\006 \001(\0132%.google.cloud.aiplatform.v1.RougeSpecH\000\022V\n" + + "\023aggregation_metrics\030\001" + + " \003(\01624.google.cloud.aiplatform.v1.Metric.AggregationMetricB\003\340A\001\"\326\001\n" + + "\021AggregationMetric\022\"\n" + + "\036AGGREGATION_METRIC_UNSPECIFIED\020\000\022\013\n" + + "\007AVERAGE\020\001\022\010\n" + + "\004MODE\020\002\022\026\n" + + "\022STANDARD_DEVIATION\020\003\022\014\n" + + "\010VARIANCE\020\004\022\013\n" + + "\007MINIMUM\020\005\022\013\n" + + "\007MAXIMUM\020\006\022\n\n" + + "\006MEDIAN\020\007\022\022\n" + + "\016PERCENTILE_P90\020\010\022\022\n" + + "\016PERCENTILE_P95\020\t\022\022\n" + + "\016PERCENTILE_P99\020\n" + + "B\r\n" + + "\013metric_spec\"\343\001\n" + + "\017AutoraterConfig\022 \n" + + "\016sampling_count\030\001 \001(\005B\003\340A\001H\000\210\001\001\022\036\n" + + "\014flip_enabled\030\002 \001(\010B\003\340A\001H\001\210\001\001\022\034\n" + + "\017autorater_model\030\003 \001(\tB\003\340A\001\022L\n" + + "\021generation_config\030\004" + + " \001(\0132,.google.cloud.aiplatform.v1.GenerationConfigB\003\340A\001B\021\n" + + "\017_sampling_countB\017\n\r" + + "_flip_enabled\"\245\022\n" + "\031EvaluateInstancesResponse\022L\n" - + "\023exact_match_results\030\001" - + " \001(\0132-.google.cloud.aiplatform.v1.ExactMatchResultsH\000\022?\n" - + "\014bleu_results\030\002 \001(\0132\'.go" - + "ogle.cloud.aiplatform.v1.BleuResultsH\000\022A\n\r" + + "\023exact_match_results\030\001 \001(\0132-.go" + + "ogle.cloud.aiplatform.v1.ExactMatchResultsH\000\022?\n" + + "\014bleu_results\030\002" + + " \001(\0132\'.google.cloud.aiplatform.v1.BleuResultsH\000\022A\n\r" + "rouge_results\030\003 \001(\0132(.google.cloud.aiplatform.v1.RougeResultsH\000\022C\n" - + "\016fluency_result\030\004" - + " \001(\0132).google.cloud.aiplatform.v1.FluencyResultH\000\022G\n" - + "\020coherence_result\030\005 \001(\013" - + "2+.google.cloud.aiplatform.v1.CoherenceResultH\000\022A\n\r" + + "\016fluency_result\030\004 \001(\013" + + "2).google.cloud.aiplatform.v1.FluencyResultH\000\022G\n" + + "\020coherence_result\030\005 \001(\0132+.google" + + ".cloud.aiplatform.v1.CoherenceResultH\000\022A\n\r" + "safety_result\030\007 \001(\0132(.google.cloud.aiplatform.v1.SafetyResultH\000\022M\n" + "\023groundedness_result\030\010" + " \001(\0132..google.cloud.aiplatform.v1.GroundednessResultH\000\022K\n" + "\022fulfillment_result\030\013" + " \001(\0132-.google.cloud.aiplatform.v1.FulfillmentResultH\000\022^\n" - + "\034summarization_quality_result\030\006 \001(\01326.google.cl" - + "oud.aiplatform.v1.SummarizationQualityResultH\000\022o\n" - + "%pairwise_summarization_quality_result\030\026 \001(\0132>.google.cloud.aiplatform." - + "v1.PairwiseSummarizationQualityResultH\000\022f\n" + + "\034summarization_quality_result\030\006" + + " \001(\01326.google.cloud.aiplatform.v1.SummarizationQualityResultH\000\022o\n" + + "%pairwise_summarization_quality_result\030\026" + + " \001(\0132>.google.cloud.aiplatform.v1.PairwiseSummarizationQualityResultH\000\022f\n" + " summarization_helpfulness_result\030\r" + " \001(\0132:.google.cloud.aiplatform.v1.SummarizationHelpfulnessResultH\000\022b\n" - + "\036summarization_verbosity_result\030\016 \001(\01328.google.cloud.a" - + "iplatform.v1.SummarizationVerbosityResultH\000\022g\n" - + "!question_answering_quality_result\030\t" - + " \001(\0132:.google.cloud.aiplatform.v1.QuestionAnsweringQualityResultH\000\022x\n" - + "*pairwise_question_answering_quality_result\030\027 \001(\013" - + "2B.google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityResultH\000\022k\n" - + "#question_answering_relevance_result\030\017 \001(\0132<.go" - + "ogle.cloud.aiplatform.v1.QuestionAnsweringRelevanceResultH\000\022o\n" - + "%question_answering_helpfulness_result\030\020 \001(\0132>.google.clou" - + "d.aiplatform.v1.QuestionAnsweringHelpfulnessResultH\000\022o\n" - + "%question_answering_correctness_result\030\021 \001(\0132>.google.cloud.aipla" - + "tform.v1.QuestionAnsweringCorrectnessResultH\000\022T\n" - + "\027pointwise_metric_result\030\033 \001(\01321" - + ".google.cloud.aiplatform.v1.PointwiseMetricResultH\000\022R\n" - + "\026pairwise_metric_result\030\034 " - + "\001(\01320.google.cloud.aiplatform.v1.PairwiseMetricResultH\000\022S\n" - + "\027tool_call_valid_results\030\022" - + " \001(\01320.google.cloud.aiplatform.v1.ToolCallValidResultsH\000\022S\n" + + "\036summarization_verbosity_result\030\016" + + " \001(\01328.google.cloud.aiplatform.v1.SummarizationVerbosityResultH\000\022g\n" + + "!question_answering_quality_result\030\t \001(\0132:." + + "google.cloud.aiplatform.v1.QuestionAnsweringQualityResultH\000\022x\n" + + "*pairwise_question_answering_quality_result\030\027 \001(\0132B.google" + + ".cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityResultH\000\022k\n" + + "#question_answering_relevance_result\030\017 \001(\0132<.google.clou" + + "d.aiplatform.v1.QuestionAnsweringRelevanceResultH\000\022o\n" + + "%question_answering_helpfulness_result\030\020 \001(\0132>.google.cloud.aiplatf" + + "orm.v1.QuestionAnsweringHelpfulnessResultH\000\022o\n" + + "%question_answering_correctness_result\030\021" + + " \001(\0132>.google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessResultH\000\022T\n" + + "\027pointwise_metric_result\030\033 \001(\01321.google.c" + + "loud.aiplatform.v1.PointwiseMetricResultH\000\022R\n" + + "\026pairwise_metric_result\030\034 \001(\01320.goo" + + "gle.cloud.aiplatform.v1.PairwiseMetricResultH\000\022S\n" + + "\027tool_call_valid_results\030\022 \001(\0132" + + "0.google.cloud.aiplatform.v1.ToolCallValidResultsH\000\022S\n" + "\027tool_name_match_results\030\023" + " \001(\01320.google.cloud.aiplatform.v1.ToolNameMatchResultsH\000\022d\n" - + " tool_parameter_key_match_results\030\024 \001(\01328.google.clo" - + "ud.aiplatform.v1.ToolParameterKeyMatchResultsH\000\022b\n" - + "\037tool_parameter_kv_match_results\030\025" - + " \001(\01327.google.cloud.aiplatform.v1.ToolParameterKVMatchResultsH\000\022?\n" - + "\014comet_result\030\035" - + " \001(\0132\'.google.cloud.aiplatform.v1.CometResultH\000\022C\n" - + "\016metricx_result\030\036 \001(\0132).g" - + "oogle.cloud.aiplatform.v1.MetricxResultH\000B\024\n" - + "\022evaluation_results\"\237\001\n" + + " tool_parameter_key_match_results\030\024 \001(\01328.google.cloud.aiplat" + + "form.v1.ToolParameterKeyMatchResultsH\000\022b\n" + + "\037tool_parameter_kv_match_results\030\025 \001(\0132" + + "7.google.cloud.aiplatform.v1.ToolParameterKVMatchResultsH\000\022?\n" + + "\014comet_result\030\035 \001(\013" + + "2\'.google.cloud.aiplatform.v1.CometResultH\000\022C\n" + + "\016metricx_result\030\036" + + " \001(\0132).google.cloud.aiplatform.v1.MetricxResultH\000\022@\n" + + "\016metric_results\030+ \003(\0132(.google.cloud.aiplatform.v1.MetricResultB\024\n" + + "\022evaluation_results\"\227\001\n" + + "\014MetricResult\022\027\n" + + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\035\n" + + "\013explanation\030\003 \001(\tB\003\340A\003H\001\210\001\001\022+\n" + + "\005error\030\004" + + " \001(\0132\022.google.rpc.StatusB\003\340A\003H\002\210\001\001B\010\n" + + "\006_scoreB\016\n" + + "\014_explanationB\010\n" + + "\006_error\"d\n" + + "\014OutputConfig\022E\n" + + "\017gcs_destination\030\001 \001(\0132*.go" + + "ogle.cloud.aiplatform.v1.GcsDestinationH\000B\r\n" + + "\013destination\"\241\001\n" + + "\021EvaluationDataset\022;\n\n" + + "gcs_source\030\001 \001(\0132%.google.cloud.aiplatform.v1.GcsSourceH\000\022E\n" + + "\017bigquery_source\030\002" + + " \001(\0132*.google.cloud.aiplatform.v1.BigQuerySourceH\000B\010\n" + + "\006source\"\253\001\n" + + "\027EvaluateDatasetResponse\022N\n" + + "\022aggregation_output\030\001 \001(\0132-.g" + + "oogle.cloud.aiplatform.v1.AggregationOutputB\003\340A\003\022@\n" + + "\013output_info\030\003" + + " \001(\0132&.google.cloud.aiplatform.v1.OutputInfoB\003\340A\003\"D\n\n" + + "OutputInfo\022#\n" + + "\024gcs_output_directory\030\001 \001(\tB\003\340A\003H\000B\021\n" + + "\017output_location\"\237\001\n" + + "\021AggregationOutput\022>\n" + + "\007dataset\030\001 \001(\0132-.google.cloud.aiplatform.v1.EvaluationDataset\022J\n" + + "\023aggregation_results\030\002" + + " \003(\0132-.google.cloud.aiplatform.v1.AggregationResult\"\222\004\n" + + "\021AggregationResult\022T\n" + + "\027pointwise_metric_result\030\005 \001(" + + "\01321.google.cloud.aiplatform.v1.PointwiseMetricResultH\000\022R\n" + + "\026pairwise_metric_result\030\006" + + " \001(\01320.google.cloud.aiplatform.v1.PairwiseMetricResultH\000\022U\n" + + "\030exact_match_metric_value\030\007" + + " \001(\01321.google.cloud.aiplatform.v1.ExactMatchMetricValueH\000\022H\n" + + "\021bleu_metric_value\030\010" + + " \001(\0132+.google.cloud.aiplatform.v1.BleuMetricValueH\000\022J\n" + + "\022rouge_metric_value\030\t" + + " \001(\0132,.google.cloud.aiplatform.v1.RougeMetricValueH\000\022P\n" + + "\022aggregation_metric\030\004 " + + "\001(\01624.google.cloud.aiplatform.v1.Metric.AggregationMetricB\024\n" + + "\022aggregation_result\"s\n" + + "\024PredefinedMetricSpec\022\035\n" + + "\020metric_spec_name\030\001 \001(\tB\003\340A\002\022<\n" + + "\026metric_spec_parameters\030\002" + + " \001(\0132\027.google.protobuf.StructB\003\340A\001\"\311\002\n" + + "\032ComputationBasedMetricSpec\022i\n" + + "\004type\030\001 \001(\0162Q.google.cloud.aiplatform.v1.Computati" + + "onBasedMetricSpec.ComputationBasedMetricTypeB\003\340A\002H\000\210\001\001\0225\n\n" + + "parameters\030\002" + + " \001(\0132\027.google.protobuf.StructB\003\340A\001H\001\210\001\001\"q\n" + + "\032ComputationBasedMetricType\022-\n" + + ")COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED\020\000\022\017\n" + + "\013EXACT_MATCH\020\001\022\010\n" + + "\004BLEU\020\002\022\t\n" + + "\005ROUGE\020\003B\007\n" + + "\005_typeB\r\n" + + "\013_parameters\"\351\003\n" + + "\022LLMBasedMetricSpec\022\032\n" + + "\020rubric_group_key\030\004 \001(\tH\000\022]\n" + + "!predefined_rubric_generation_spec\030\006" + + " \001(\01320.google.cloud.aiplatform.v1.PredefinedMetricSpecH\000\022(\n" + + "\026metric_prompt_template\030\001 \001(\tB\003\340A\002H\001\210\001\001\022$\n" + + "\022system_instruction\030\002 \001(\tB\003\340A\001H\002\210\001\001\022U\n" + + "\026judge_autorater_config\030\003 \001(\0132+.google.clou" + + "d.aiplatform.v1.AutoraterConfigB\003\340A\001H\003\210\001\001\022<\n" + + "\021additional_config\030\007" + + " \001(\0132\027.google.protobuf.StructB\003\340A\001H\004\210\001\001B\020\n" + + "\016rubrics_sourceB\031\n" + + "\027_metric_prompt_templateB\025\n" + + "\023_system_instructionB\031\n" + + "\027_judge_autorater_configB\024\n" + + "\022_additional_config\"\237\001\n" + "\017ExactMatchInput\022D\n" + "\013metric_spec\030\001" + " \001(\0132*.google.cloud.aiplatform.v1.ExactMatchSpecB\003\340A\002\022F\n" @@ -608,8 +798,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n" + "\006_score\"\215\001\n" + "\tBleuInput\022>\n" - + "\013metric_spec\030\001 \001(\013" - + "2$.google.cloud.aiplatform.v1.BleuSpecB\003\340A\002\022@\n" + + "\013metric_spec\030\001 \001(\0132$." + + "google.cloud.aiplatform.v1.BleuSpecB\003\340A\002\022@\n" + "\tinstances\030\002" + " \003(\0132(.google.cloud.aiplatform.v1.BleuInstanceB\003\340A\002\"f\n" + "\014BleuInstance\022\034\n\n" @@ -626,8 +816,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n" + "\006_score\"\220\001\n\n" + "RougeInput\022?\n" - + "\013metric_spec\030\001 \001" - + "(\0132%.google.cloud.aiplatform.v1.RougeSpecB\003\340A\002\022A\n" + + "\013metric_spec\030\001 \001(\0132" + + "%.google.cloud.aiplatform.v1.RougeSpecB\003\340A\002\022A\n" + "\tinstances\030\002" + " \003(\0132).google.cloud.aiplatform.v1.RougeInstanceB\003\340A\002\"g\n\r" + "RougeInstance\022\034\n\n" @@ -640,8 +830,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013use_stemmer\030\002 \001(\010B\003\340A\001\022\034\n" + "\017split_summaries\030\003 \001(\010B\003\340A\001\"^\n" + "\014RougeResults\022N\n" - + "\023rouge_metric_values\030\001 \003(\0132,." - + "google.cloud.aiplatform.v1.RougeMetricValueB\003\340A\003\"5\n" + + "\023rouge_metric_values\030\001 \003(\0132,.goo" + + "gle.cloud.aiplatform.v1.RougeMetricValueB\003\340A\003\"5\n" + "\020RougeMetricValue\022\027\n" + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n" + "\006_score\"\233\001\n" @@ -664,8 +854,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014FluencyInput\022A\n" + "\013metric_spec\030\001" + " \001(\0132\'.google.cloud.aiplatform.v1.FluencySpecB\003\340A\002\022B\n" - + "\010instance\030\002 \001(\0132+.goog" - + "le.cloud.aiplatform.v1.FluencyInstanceB\003\340A\002\">\n" + + "\010instance\030\002 \001(\0132+.google." + + "cloud.aiplatform.v1.FluencyInstanceB\003\340A\002\">\n" + "\017FluencyInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001B\r\n" + "\013_prediction\"#\n" @@ -694,10 +884,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\244\001\n" + "\021GroundednessInput\022F\n" - + "\013metric_spec\030\001 \001(\013" - + "2,.google.cloud.aiplatform.v1.GroundednessSpecB\003\340A\002\022G\n" - + "\010instance\030\002 \001(\01320.google.c" - + "loud.aiplatform.v1.GroundednessInstanceB\003\340A\002\"j\n" + + "\013metric_spec\030\001 \001(\0132,." + + "google.cloud.aiplatform.v1.GroundednessSpecB\003\340A\002\022G\n" + + "\010instance\030\002 \001(\01320.google.clou" + + "d.aiplatform.v1.GroundednessInstanceB\003\340A\002\"j\n" + "\024GroundednessInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\031\n" + "\007context\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n" @@ -712,10 +902,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\241\001\n" + "\020FulfillmentInput\022E\n" - + "\013metric_spec\030\001" - + " \001(\0132+.google.cloud.aiplatform.v1.FulfillmentSpecB\003\340A\002\022F\n" - + "\010instance\030\002 \001(\0132/.googl" - + "e.cloud.aiplatform.v1.FulfillmentInstanceB\003\340A\002\"q\n" + + "\013metric_spec\030\001 \001(" + + "\0132+.google.cloud.aiplatform.v1.FulfillmentSpecB\003\340A\002\022F\n" + + "\010instance\030\002 \001(\0132/.google.c" + + "loud.aiplatform.v1.FulfillmentInstanceB\003\340A\002\"q\n" + "\023FulfillmentInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\035\n" + "\013instruction\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n" @@ -730,10 +920,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\274\001\n" + "\031SummarizationQualityInput\022N\n" - + "\013metric_spec\030\001 \001(\01324.google.cloud.aipl" - + "atform.v1.SummarizationQualitySpecB\003\340A\002\022O\n" - + "\010instance\030\002 \001(\01328.google.cloud.aiplatf" - + "orm.v1.SummarizationQualityInstanceB\003\340A\002\"\314\001\n" + + "\013metric_spec\030\001" + + " \001(\01324.google.cloud.aiplatform.v1.SummarizationQualitySpecB\003\340A\002\022O\n" + + "\010instance\030\002 \001(\01328.google.cloud.aiplatform" + + ".v1.SummarizationQualityInstanceB\003\340A\002\"\314\001\n" + "\034SummarizationQualityInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" + "\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n" @@ -753,10 +943,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\324\001\n" + "!PairwiseSummarizationQualityInput\022V\n" - + "\013metric_spec\030\001 \001(" - + "\0132<.google.cloud.aiplatform.v1.PairwiseSummarizationQualitySpecB\003\340A\002\022W\n" - + "\010instance\030\002 \001(\0132@.google.cloud.aiplatform.v1.Pair" - + "wiseSummarizationQualityInstanceB\003\340A\002\"\223\002\n" + + "\013metric_spec\030\001 \001(\0132<" + + ".google.cloud.aiplatform.v1.PairwiseSummarizationQualitySpecB\003\340A\002\022W\n" + + "\010instance\030\002 " + + "\001(\0132@.google.cloud.aiplatform.v1.PairwiseSummarizationQualityInstanceB\003\340A\002\"\223\002\n" + "$PairwiseSummarizationQualityInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022%\n" + "\023baseline_prediction\030\002 \001(\tB\003\340A\002H\001\210\001\001\022\033\n" @@ -778,17 +968,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "confidence\030\003 \001(\002B\003\340A\003H\000\210\001\001B\r\n" + "\013_confidence\"\310\001\n" + "\035SummarizationHelpfulnessInput\022R\n" - + "\013metric_spec\030\001 \001(\013" - + "28.google.cloud.aiplatform.v1.SummarizationHelpfulnessSpecB\003\340A\002\022S\n" - + "\010instance\030\002 \001(" - + "\0132<.google.cloud.aiplatform.v1.SummarizationHelpfulnessInstanceB\003\340A\002\"\320\001\n" + + "\013metric_spec\030\001 \001(\01328." + + "google.cloud.aiplatform.v1.SummarizationHelpfulnessSpecB\003\340A\002\022S\n" + + "\010instance\030\002 \001(\0132<" + + ".google.cloud.aiplatform.v1.SummarizationHelpfulnessInstanceB\003\340A\002\"\320\001\n" + " SummarizationHelpfulnessInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" + "\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n" + "\007context\030\003 \001(\tB\003\340A\002H\002\210\001\001\022\035\n" + "\013instruction\030\004 \001(\tB\003\340A\001H\003\210\001\001B\r\n" - + "\013_predictionB\014\n" - + "\n" + + "\013_predictionB\014\n\n" + "_referenceB\n\n" + "\010_contextB\016\n" + "\014_instruction\"P\n" @@ -802,10 +991,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\302\001\n" + "\033SummarizationVerbosityInput\022P\n" - + "\013metric_spec\030\001 \001(\01326.go" - + "ogle.cloud.aiplatform.v1.SummarizationVerbositySpecB\003\340A\002\022Q\n" - + "\010instance\030\002 \001(\0132:.goo" - + "gle.cloud.aiplatform.v1.SummarizationVerbosityInstanceB\003\340A\002\"\316\001\n" + + "\013metric_spec\030\001 \001(\01326.googl" + + "e.cloud.aiplatform.v1.SummarizationVerbositySpecB\003\340A\002\022Q\n" + + "\010instance\030\002 \001(\0132:.google" + + ".cloud.aiplatform.v1.SummarizationVerbosityInstanceB\003\340A\002\"\316\001\n" + "\036SummarizationVerbosityInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" + "\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n" @@ -825,10 +1014,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\310\001\n" + "\035QuestionAnsweringQualityInput\022R\n" - + "\013metric_spec\030\001 \001(\01328.google.cloud.ai" - + "platform.v1.QuestionAnsweringQualitySpecB\003\340A\002\022S\n" - + "\010instance\030\002 \001(\0132<.google.cloud.a" - + "iplatform.v1.QuestionAnsweringQualityInstanceB\003\340A\002\"\320\001\n" + + "\013metric_spec\030\001 \001(\01328.google.cloud.aipla" + + "tform.v1.QuestionAnsweringQualitySpecB\003\340A\002\022S\n" + + "\010instance\030\002 \001(\0132<.google.cloud.aipl" + + "atform.v1.QuestionAnsweringQualityInstanceB\003\340A\002\"\320\001\n" + " QuestionAnsweringQualityInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" + "\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n" @@ -848,10 +1037,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\340\001\n" + "%PairwiseQuestionAnsweringQualityInput\022Z\n" - + "\013metric_spec\030\001 \001(\0132@.google.clo" - + "ud.aiplatform.v1.PairwiseQuestionAnsweringQualitySpecB\003\340A\002\022[\n" - + "\010instance\030\002 \001(\0132D.g" - + "oogle.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInstanceB\003\340A\002\"\227\002\n" + + "\013metric_spec\030\001 \001(\0132@.google.cloud." + + "aiplatform.v1.PairwiseQuestionAnsweringQualitySpecB\003\340A\002\022[\n" + + "\010instance\030\002 \001(\0132D.goog" + + "le.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInstanceB\003\340A\002\"\227\002\n" + "(PairwiseQuestionAnsweringQualityInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022%\n" + "\023baseline_prediction\030\002 \001(\tB\003\340A\002H\001\210\001\001\022\033\n" @@ -867,16 +1056,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "use_reference\030\001 \001(\010B\003\340A\001\022\024\n" + "\007version\030\002 \001(\005B\003\340A\001\"\271\001\n" + "&PairwiseQuestionAnsweringQualityResult\022H\n" - + "\017pairwise_choice\030\001 \001(\0162*.google" - + ".cloud.aiplatform.v1.PairwiseChoiceB\003\340A\003\022\030\n" + + "\017pairwise_choice\030\001" + + " \001(\0162*.google.cloud.aiplatform.v1.PairwiseChoiceB\003\340A\003\022\030\n" + "\013explanation\030\002 \001(\tB\003\340A\003\022\034\n\n" + "confidence\030\003 \001(\002B\003\340A\003H\000\210\001\001B\r\n" + "\013_confidence\"\316\001\n" + "\037QuestionAnsweringRelevanceInput\022T\n" - + "\013metric_spec\030\001" - + " \001(\0132:.google.cloud.aiplatform.v1.QuestionAnsweringRelevanceSpecB\003\340A\002\022U\n" - + "\010instance\030\002 \001(\0132>.google.cloud.aiplatform.v1" - + ".QuestionAnsweringRelevanceInstanceB\003\340A\002\"\322\001\n" + + "\013metric_spec\030\001 \001(\0132:.google.cloud.aiplatform.v1.Quest", + "ionAnsweringRelevanceSpecB\003\340A\002\022U\n" + + "\010instance\030\002 \001(\0132>.google.cloud.aiplatform.v1.Qu" + + "estionAnsweringRelevanceInstanceB\003\340A\002\"\322\001\n" + "\"QuestionAnsweringRelevanceInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" + "\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n" @@ -896,10 +1085,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\324\001\n" + "!QuestionAnsweringHelpfulnessInput\022V\n" - + "\013metric_spec\030\001 \001(\0132<.google.cloud.aipla" - + "tform.v1.QuestionAnsweringHelpfulnessSpecB\003\340A\002\022W\n" - + "\010instance\030\002 \001(\0132@.google.cloud." - + "aiplatform.v1.QuestionAnsweringHelpfulnessInstanceB\003\340A\002\"\324\001\n" + + "\013metric_spec\030\001 \001(\0132<.google.cloud.aiplatfo" + + "rm.v1.QuestionAnsweringHelpfulnessSpecB\003\340A\002\022W\n" + + "\010instance\030\002 \001(\0132@.google.cloud.aip" + + "latform.v1.QuestionAnsweringHelpfulnessInstanceB\003\340A\002\"\324\001\n" + "$QuestionAnsweringHelpfulnessInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" + "\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n" @@ -919,12 +1108,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_scoreB\r\n" + "\013_confidence\"\324\001\n" + "!QuestionAnsweringCorrectnessInput\022V\n" - + "\013metric_spec\030\001 \001(\013" - + "2<.google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessSpecB\003\340A\002\022W\n" - + "\010instance\030\002" - + " \001(\0132@.google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInstanceB\003\340A\002\"\324\001\n" - + "$QuestionAnsweringCorrectnessInstance\022\034\n" - + "\n" + + "\013metric_spec\030\001 \001(\0132<." + + "google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessSpecB\003\340A\002\022W\n" + + "\010instance\030\002 \001" + + "(\0132@.google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInstanceB\003\340A\002\"\324\001\n" + + "$QuestionAnsweringCorrectnessInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" + "\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n" + "\007context\030\003 \001(\tB\003\340A\001H\002\210\001\001\022\035\n" @@ -945,38 +1133,65 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024PointwiseMetricInput\022I\n" + "\013metric_spec\030\001" + " \001(\0132/.google.cloud.aiplatform.v1.PointwiseMetricSpecB\003\340A\002\022J\n" - + "\010instance\030\002 \001(\013" - + "23.google.cloud.aiplatform.v1.PointwiseMetricInstanceB\003\340A\002\">\n" + + "\010instance\030\002 \001(\01323." + + "google.cloud.aiplatform.v1.PointwiseMetricInstanceB\003\340A\002\"\206\001\n" + "\027PointwiseMetricInstance\022\027\n\r" - + "json_instance\030\001 \001(\tH\000B\n\n" - + "\010instance\"Z\n" + + "json_instance\030\001 \001(\tH\000\022F\n" + + "\024content_map_instance\030\002" + + " \001(\0132&.google.cloud.aiplatform.v1.ContentMapH\000B\n\n" + + "\010instance\"\367\001\n" + "\023PointwiseMetricSpec\022(\n" - + "\026metric_prompt_template\030\001 \001(\tB\003\340A\002H\000\210\001\001B\031\n" - + "\027_metric_prompt_template\"T\n" + + "\026metric_prompt_template\030\001 \001(\tB\003\340A\002H\000\210\001\001\022$\n" + + "\022system_instruction\030\002 \001(\tB\003\340A\001H\001\210\001\001\022^\n" + + "\033custom_output_format_config\030\003" + + " \001(\01324.google.cloud.aiplatform.v1.CustomOutputFormatConfigB\003\340A\001B\031\n" + + "\027_metric_prompt_templateB\025\n" + + "\023_system_instruction\"[\n" + + "\030CustomOutputFormatConfig\022 \n" + + "\021return_raw_output\030\001 \001(\010B\003\340A\001H\000B\035\n" + + "\033custom_output_format_config\"\232\001\n" + "\025PointwiseMetricResult\022\027\n" + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n" - + "\013explanation\030\002 \001(\tB\003\340A\003B\010\n" - + "\006_score\"\252\001\n" + + "\013explanation\030\002 \001(\tB\003\340A\003\022D\n\r" + + "custom_output\030\003 \001(\0132(.go" + + "ogle.cloud.aiplatform.v1.CustomOutputB\003\340A\003B\010\n" + + "\006_score\"b\n" + + "\014CustomOutput\022A\n" + + "\013raw_outputs\030\001" + + " \001(\0132%.google.cloud.aiplatform.v1.RawOutputB\003\340A\003H\000B\017\n\r" + + "custom_output\"$\n" + + "\tRawOutput\022\027\n\n" + + "raw_output\030\001 \003(\tB\003\340A\003\"\252\001\n" + "\023PairwiseMetricInput\022H\n" - + "\013metric_spec\030\001 \001(\0132..google.cloud" - + ".aiplatform.v1.PairwiseMetricSpecB\003\340A\002\022I\n" - + "\010instance\030\002" - + " \001(\01322.google.cloud.aiplatform.v1.PairwiseMetricInstanceB\003\340A\002\"=\n" + + "\013metric_spec\030\001 \001(\0132..go" + + "ogle.cloud.aiplatform.v1.PairwiseMetricSpecB\003\340A\002\022I\n" + + "\010instance\030\002 \001(\01322.google.clou" + + "d.aiplatform.v1.PairwiseMetricInstanceB\003\340A\002\"\205\001\n" + "\026PairwiseMetricInstance\022\027\n\r" - + "json_instance\030\001 \001(\tH\000B\n\n" - + "\010instance\"Y\n" + + "json_instance\030\001 \001(\tH\000\022F\n" + + "\024content_map_instance\030\002" + + " \001(\0132&.google.cloud.aiplatform.v1.ContentMapH\000B\n\n" + + "\010instance\"\315\002\n" + "\022PairwiseMetricSpec\022(\n" - + "\026metric_prompt_template\030\001 \001(\tB\003\340A\002H\000\210\001\001B\031\n" - + "\027_metric_prompt_template\"z\n" + + "\026metric_prompt_template\030\001 \001(\tB\003\340A\002H\000\210\001\001\022*\n" + + "\035candidate_response_field_name\030\002 \001(\tB\003\340A\001\022)\n" + + "\034baseline_response_field_name\030\003 \001(\tB\003\340A\001\022$\n" + + "\022system_instruction\030\004 \001(\tB\003\340A\001H\001\210\001\001\022^\n" + + "\033custom_output_format_config\030\005" + + " \001(\01324.google.cloud.aiplatform.v1.CustomOutputFormatConfigB\003\340A\001B\031\n" + + "\027_metric_prompt_templateB\025\n" + + "\023_system_instruction\"\300\001\n" + "\024PairwiseMetricResult\022H\n" - + "\017pairwise_choice\030\001 \001(\0162*.g" - + "oogle.cloud.aiplatform.v1.PairwiseChoiceB\003\340A\003\022\030\n" - + "\013explanation\030\002 \001(\tB\003\340A\003\"\250\001\n" + + "\017pairwise_choice\030\001" + + " \001(\0162*.google.cloud.aiplatform.v1.PairwiseChoiceB\003\340A\003\022\030\n" + + "\013explanation\030\002 \001(\tB\003\340A\003\022D\n\r" + + "custom_output\030\003" + + " \001(\0132(.google.cloud.aiplatform.v1.CustomOutputB\003\340A\003\"\250\001\n" + "\022ToolCallValidInput\022G\n" - + "\013metric_spec\030\001 \001(\0132-.go" - + "ogle.cloud.aiplatform.v1.ToolCallValidSpecB\003\340A\002\022I\n" - + "\tinstances\030\002 \003(\01321.google.clou" - + "d.aiplatform.v1.ToolCallValidInstanceB\003\340A\002\"\023\n" + + "\013metric_spec\030\001 \001(\0132-.goo" + + "gle.cloud.aiplatform.v1.ToolCallValidSpecB\003\340A\002\022I\n" + + "\tinstances\030\002 \003(\01321.google.cloud" + + ".aiplatform.v1.ToolCallValidInstanceB\003\340A\002\"\023\n" + "\021ToolCallValidSpec\"o\n" + "\025ToolCallValidInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" @@ -984,16 +1199,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013_predictionB\014\n\n" + "_reference\"x\n" + "\024ToolCallValidResults\022`\n" - + "\035tool_call_valid_metric_values\030\001 \003(\0132" - + "4.google.cloud.aiplatform.v1.ToolCallValidMetricValueB\003\340A\003\"=\n" + + "\035tool_call_valid_metric_values\030\001 \003(\01324" + + ".google.cloud.aiplatform.v1.ToolCallValidMetricValueB\003\340A\003\"=\n" + "\030ToolCallValidMetricValue\022\027\n" + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n" + "\006_score\"\250\001\n" + "\022ToolNameMatchInput\022G\n" + "\013metric_spec\030\001" + " \001(\0132-.google.cloud.aiplatform.v1.ToolNameMatchSpecB\003\340A\002\022I\n" - + "\tinstances\030\002 \003(\01321.g" - + "oogle.cloud.aiplatform.v1.ToolNameMatchInstanceB\003\340A\002\"\023\n" + + "\tinstances\030\002 \003(\01321.go" + + "ogle.cloud.aiplatform.v1.ToolNameMatchInstanceB\003\340A\002\"\023\n" + "\021ToolNameMatchSpec\"o\n" + "\025ToolNameMatchInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" @@ -1003,15 +1218,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024ToolNameMatchResults\022`\n" + "\035tool_name_match_metric_values\030\001" + " \003(\01324.google.cloud.aiplatform.v1.ToolNameMatchMetricValueB\003\340A\003\"=\n" - + "\030ToolName", - "MatchMetricValue\022\027\n" + + "\030ToolNameMatchMetricValue\022\027\n" + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n" + "\006_score\"\300\001\n" + "\032ToolParameterKeyMatchInput\022O\n" - + "\013metric_spec\030\001 \001(\01325.google.cloud.a" - + "iplatform.v1.ToolParameterKeyMatchSpecB\003\340A\002\022Q\n" - + "\tinstances\030\002 \003(\01329.google.cloud.ai" - + "platform.v1.ToolParameterKeyMatchInstanceB\003\340A\002\"\033\n" + + "\013metric_spec\030\001 \001(\01325.google.cloud.ai" + + "platform.v1.ToolParameterKeyMatchSpecB\003\340A\002\022Q\n" + + "\tinstances\030\002 \003(\01329.google.cloud.aip" + + "latform.v1.ToolParameterKeyMatchInstanceB\003\340A\002\"\033\n" + "\031ToolParameterKeyMatchSpec\"w\n" + "\035ToolParameterKeyMatchInstance\022\034\n\n" + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n" @@ -1019,16 +1233,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013_predictionB\014\n\n" + "_reference\"\221\001\n" + "\034ToolParameterKeyMatchResults\022q\n" - + "&tool_parameter_key_match_metric_values\030\001 \003(\0132<." - + "google.cloud.aiplatform.v1.ToolParameterKeyMatchMetricValueB\003\340A\003\"E\n" + + "&tool_parameter_key_match_metric_values\030\001 \003(\0132<.g" + + "oogle.cloud.aiplatform.v1.ToolParameterKeyMatchMetricValueB\003\340A\003\"E\n" + " ToolParameterKeyMatchMetricValue\022\027\n" + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n" + "\006_score\"\275\001\n" + "\031ToolParameterKVMatchInput\022N\n" - + "\013metric_spec\030\001 \001(\01324.google.clou" - + "d.aiplatform.v1.ToolParameterKVMatchSpecB\003\340A\002\022P\n" - + "\tinstances\030\002 \003(\01328.google.cloud." - + "aiplatform.v1.ToolParameterKVMatchInstanceB\003\340A\002\"@\n" + + "\013metric_spec\030\001 \001(\01324.google.cloud" + + ".aiplatform.v1.ToolParameterKVMatchSpecB\003\340A\002\022P\n" + + "\tinstances\030\002 \003(\01328.google.cloud.a" + + "iplatform.v1.ToolParameterKVMatchInstanceB\003\340A\002\"@\n" + "\030ToolParameterKVMatchSpec\022$\n" + "\027use_strict_string_match\030\001 \001(\010B\003\340A\001\"v\n" + "\034ToolParameterKVMatchInstance\022\034\n\n" @@ -1037,19 +1251,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013_predictionB\014\n\n" + "_reference\"\216\001\n" + "\033ToolParameterKVMatchResults\022o\n" - + "%tool_parameter_kv_match_metric_values\030\001 \003(\0132;.googl" - + "e.cloud.aiplatform.v1.ToolParameterKVMatchMetricValueB\003\340A\003\"D\n" + + "%tool_parameter_kv_match_metric_values\030\001 \003(\0132;.google" + + ".cloud.aiplatform.v1.ToolParameterKVMatchMetricValueB\003\340A\003\"D\n" + "\037ToolParameterKVMatchMetricValue\022\027\n" + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n" + "\006_score\"\217\001\n\n" + "CometInput\022?\n" - + "\013metric_spec\030\001" - + " \001(\0132%.google.cloud.aiplatform.v1.CometSpecB\003\340A\002\022@\n" + + "\013metric_spec\030\001 " + + "\001(\0132%.google.cloud.aiplatform.v1.CometSpecB\003\340A\002\022@\n" + "\010instance\030\002" + " \001(\0132).google.cloud.aiplatform.v1.CometInstanceB\003\340A\002\"\347\001\n" + "\tCometSpec\022M\n" - + "\007version\030\001 \001(\01622.google.cloud" - + ".aiplatform.v1.CometSpec.CometVersionB\003\340A\002H\000\210\001\001\022\034\n" + + "\007version\030\001 \001(\01622.google.cloud." + + "aiplatform.v1.CometSpec.CometVersionB\003\340A\002H\000\210\001\001\022\034\n" + "\017source_language\030\002 \001(\tB\003\340A\001\022\034\n" + "\017target_language\030\003 \001(\tB\003\340A\001\"C\n" + "\014CometVersion\022\035\n" @@ -1069,8 +1283,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014MetricxInput\022A\n" + "\013metric_spec\030\001" + " \001(\0132\'.google.cloud.aiplatform.v1.MetricxSpecB\003\340A\002\022B\n" - + "\010instance\030\002 " - + "\001(\0132+.google.cloud.aiplatform.v1.MetricxInstanceB\003\340A\002\"\233\002\n" + + "\010instance\030\002 \001" + + "(\0132+.google.cloud.aiplatform.v1.MetricxInstanceB\003\340A\002\"\233\002\n" + "\013MetricxSpec\022Q\n" + "\007version\030\001" + " \001(\01626.google.cloud.aiplatform.v1.MetricxSpec.MetricxVersionB\003\340A\002H\000\210\001\001\022\034\n" @@ -1091,24 +1305,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\007_source\"2\n\r" + "MetricxResult\022\027\n" + "\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n" - + "\006_score*W\n" + + "\006_score\"\375\001\n\n" + + "ContentMap\022G\n" + + "\006values\030\001" + + " \003(\01322.google.cloud.aiplatform.v1.ContentMap.ValuesEntryB\003\340A\001\032F\n" + + "\010Contents\022:\n" + + "\010contents\030\001" + + " \003(\0132#.google.cloud.aiplatform.v1.ContentB\003\340A\001\032^\n" + + "\013ValuesEntry\022\013\n" + + "\003key\030\001 \001(\t\022>\n" + + "\005value\030\002" + + " \001(\0132/.google.cloud.aiplatform.v1.ContentMap.Contents:\0028\001*W\n" + "\016PairwiseChoice\022\037\n" + "\033PAIRWISE_CHOICE_UNSPECIFIED\020\000\022\014\n" + "\010BASELINE\020\001\022\r\n" + "\tCANDIDATE\020\002\022\007\n" + "\003TIE\020\0032\251\002\n" + "\021EvaluationService\022\304\001\n" - + "\021EvaluateInstances\0224.google.cloud.aiplatform.v1.EvaluateInstancesRequ" - + "est\0325.google.cloud.aiplatform.v1.Evaluat" - + "eInstancesResponse\"B\202\323\344\223\002<\"7/v1/{locatio" - + "n=projects/*/locations/*}:evaluateInstan" - + "ces:\001*\032M\312A\031aiplatform.googleapis.com\322A.h" - + "ttps://www.googleapis.com/auth/cloud-platformB\324\001\n" - + "\036com.google.cloud.aiplatform.v1B\026EvaluationServiceProtoP\001Z>cloud.google" - + ".com/go/aiplatform/apiv1/aiplatformpb;ai" - + "platformpb\252\002\032Google.Cloud.AIPlatform.V1\312" - + "\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::C" - + "loud::AIPlatform::V1b\006proto3" + + "\021EvaluateInstances\0224.google.cloud.aiplatform.v1.Evalua" + + "teInstancesRequest\0325.google.cloud.aiplat" + + "form.v1.EvaluateInstancesResponse\"B\202\323\344\223\002" + + "<\"7/v1/{location=projects/*/locations/*}" + + ":evaluateInstances:\001*\032M\312A\031aiplatform.goo" + + "gleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\324\001\n" + + "\036com.google.cloud.aiplatform.v1B\026EvaluationServiceProtoP" + + "\001Z>cloud.google.com/go/aiplatform/apiv1/" + + "aiplatformpb;aiplatformpb\252\002\032Google.Cloud" + + ".AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatform" + + "\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1118,6 +1342,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ContentProto.getDescriptor(), + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_cloud_aiplatform_v1_EvaluateInstancesRequest_descriptor = getDescriptor().getMessageType(0); @@ -1153,8 +1381,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Location", "MetricInputs", }); - internal_static_google_cloud_aiplatform_v1_EvaluateInstancesResponse_descriptor = + internal_static_google_cloud_aiplatform_v1_Metric_descriptor = getDescriptor().getMessageType(1); + internal_static_google_cloud_aiplatform_v1_Metric_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Metric_descriptor, + new java.lang.String[] { + "PredefinedMetricSpec", + "ComputationBasedMetricSpec", + "LlmBasedMetricSpec", + "PointwiseMetricSpec", + "PairwiseMetricSpec", + "ExactMatchSpec", + "BleuSpec", + "RougeSpec", + "AggregationMetrics", + "MetricSpec", + }); + internal_static_google_cloud_aiplatform_v1_AutoraterConfig_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_aiplatform_v1_AutoraterConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_AutoraterConfig_descriptor, + new java.lang.String[] { + "SamplingCount", "FlipEnabled", "AutoraterModel", "GenerationConfig", + }); + internal_static_google_cloud_aiplatform_v1_EvaluateInstancesResponse_descriptor = + getDescriptor().getMessageType(3); internal_static_google_cloud_aiplatform_v1_EvaluateInstancesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_EvaluateInstancesResponse_descriptor, @@ -1184,10 +1437,103 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ToolParameterKvMatchResults", "CometResult", "MetricxResult", + "MetricResults", "EvaluationResults", }); + internal_static_google_cloud_aiplatform_v1_MetricResult_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_aiplatform_v1_MetricResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MetricResult_descriptor, + new java.lang.String[] { + "Score", "Explanation", "Error", + }); + internal_static_google_cloud_aiplatform_v1_OutputConfig_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_aiplatform_v1_OutputConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_OutputConfig_descriptor, + new java.lang.String[] { + "GcsDestination", "Destination", + }); + internal_static_google_cloud_aiplatform_v1_EvaluationDataset_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_aiplatform_v1_EvaluationDataset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_EvaluationDataset_descriptor, + new java.lang.String[] { + "GcsSource", "BigquerySource", "Source", + }); + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetResponse_descriptor, + new java.lang.String[] { + "AggregationOutput", "OutputInfo", + }); + internal_static_google_cloud_aiplatform_v1_OutputInfo_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_aiplatform_v1_OutputInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_OutputInfo_descriptor, + new java.lang.String[] { + "GcsOutputDirectory", "OutputLocation", + }); + internal_static_google_cloud_aiplatform_v1_AggregationOutput_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_aiplatform_v1_AggregationOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_AggregationOutput_descriptor, + new java.lang.String[] { + "Dataset", "AggregationResults", + }); + internal_static_google_cloud_aiplatform_v1_AggregationResult_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_aiplatform_v1_AggregationResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_AggregationResult_descriptor, + new java.lang.String[] { + "PointwiseMetricResult", + "PairwiseMetricResult", + "ExactMatchMetricValue", + "BleuMetricValue", + "RougeMetricValue", + "AggregationMetric", + "AggregationResult", + }); + internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_descriptor, + new java.lang.String[] { + "MetricSpecName", "MetricSpecParameters", + }); + internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ComputationBasedMetricSpec_descriptor, + new java.lang.String[] { + "Type", "Parameters", + }); + internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_descriptor, + new java.lang.String[] { + "RubricGroupKey", + "PredefinedRubricGenerationSpec", + "MetricPromptTemplate", + "SystemInstruction", + "JudgeAutoraterConfig", + "AdditionalConfig", + "RubricsSource", + }); internal_static_google_cloud_aiplatform_v1_ExactMatchInput_descriptor = - getDescriptor().getMessageType(2); + getDescriptor().getMessageType(14); internal_static_google_cloud_aiplatform_v1_ExactMatchInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ExactMatchInput_descriptor, @@ -1195,7 +1541,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instances", }); internal_static_google_cloud_aiplatform_v1_ExactMatchInstance_descriptor = - getDescriptor().getMessageType(3); + getDescriptor().getMessageType(15); internal_static_google_cloud_aiplatform_v1_ExactMatchInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ExactMatchInstance_descriptor, @@ -1203,13 +1549,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", }); internal_static_google_cloud_aiplatform_v1_ExactMatchSpec_descriptor = - getDescriptor().getMessageType(4); + getDescriptor().getMessageType(16); internal_static_google_cloud_aiplatform_v1_ExactMatchSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ExactMatchSpec_descriptor, new java.lang.String[] {}); internal_static_google_cloud_aiplatform_v1_ExactMatchResults_descriptor = - getDescriptor().getMessageType(5); + getDescriptor().getMessageType(17); internal_static_google_cloud_aiplatform_v1_ExactMatchResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ExactMatchResults_descriptor, @@ -1217,7 +1563,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExactMatchMetricValues", }); internal_static_google_cloud_aiplatform_v1_ExactMatchMetricValue_descriptor = - getDescriptor().getMessageType(6); + getDescriptor().getMessageType(18); internal_static_google_cloud_aiplatform_v1_ExactMatchMetricValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ExactMatchMetricValue_descriptor, @@ -1225,7 +1571,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_cloud_aiplatform_v1_BleuInput_descriptor = - getDescriptor().getMessageType(7); + getDescriptor().getMessageType(19); internal_static_google_cloud_aiplatform_v1_BleuInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_BleuInput_descriptor, @@ -1233,7 +1579,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instances", }); internal_static_google_cloud_aiplatform_v1_BleuInstance_descriptor = - getDescriptor().getMessageType(8); + getDescriptor().getMessageType(20); internal_static_google_cloud_aiplatform_v1_BleuInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_BleuInstance_descriptor, @@ -1241,7 +1587,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", }); internal_static_google_cloud_aiplatform_v1_BleuSpec_descriptor = - getDescriptor().getMessageType(9); + getDescriptor().getMessageType(21); internal_static_google_cloud_aiplatform_v1_BleuSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_BleuSpec_descriptor, @@ -1249,7 +1595,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseEffectiveOrder", }); internal_static_google_cloud_aiplatform_v1_BleuResults_descriptor = - getDescriptor().getMessageType(10); + getDescriptor().getMessageType(22); internal_static_google_cloud_aiplatform_v1_BleuResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_BleuResults_descriptor, @@ -1257,7 +1603,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BleuMetricValues", }); internal_static_google_cloud_aiplatform_v1_BleuMetricValue_descriptor = - getDescriptor().getMessageType(11); + getDescriptor().getMessageType(23); internal_static_google_cloud_aiplatform_v1_BleuMetricValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_BleuMetricValue_descriptor, @@ -1265,7 +1611,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_cloud_aiplatform_v1_RougeInput_descriptor = - getDescriptor().getMessageType(12); + getDescriptor().getMessageType(24); internal_static_google_cloud_aiplatform_v1_RougeInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_RougeInput_descriptor, @@ -1273,7 +1619,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instances", }); internal_static_google_cloud_aiplatform_v1_RougeInstance_descriptor = - getDescriptor().getMessageType(13); + getDescriptor().getMessageType(25); internal_static_google_cloud_aiplatform_v1_RougeInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_RougeInstance_descriptor, @@ -1281,7 +1627,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", }); internal_static_google_cloud_aiplatform_v1_RougeSpec_descriptor = - getDescriptor().getMessageType(14); + getDescriptor().getMessageType(26); internal_static_google_cloud_aiplatform_v1_RougeSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_RougeSpec_descriptor, @@ -1289,7 +1635,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RougeType", "UseStemmer", "SplitSummaries", }); internal_static_google_cloud_aiplatform_v1_RougeResults_descriptor = - getDescriptor().getMessageType(15); + getDescriptor().getMessageType(27); internal_static_google_cloud_aiplatform_v1_RougeResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_RougeResults_descriptor, @@ -1297,7 +1643,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RougeMetricValues", }); internal_static_google_cloud_aiplatform_v1_RougeMetricValue_descriptor = - getDescriptor().getMessageType(16); + getDescriptor().getMessageType(28); internal_static_google_cloud_aiplatform_v1_RougeMetricValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_RougeMetricValue_descriptor, @@ -1305,7 +1651,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_cloud_aiplatform_v1_CoherenceInput_descriptor = - getDescriptor().getMessageType(17); + getDescriptor().getMessageType(29); internal_static_google_cloud_aiplatform_v1_CoherenceInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CoherenceInput_descriptor, @@ -1313,7 +1659,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_CoherenceInstance_descriptor = - getDescriptor().getMessageType(18); + getDescriptor().getMessageType(30); internal_static_google_cloud_aiplatform_v1_CoherenceInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CoherenceInstance_descriptor, @@ -1321,7 +1667,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", }); internal_static_google_cloud_aiplatform_v1_CoherenceSpec_descriptor = - getDescriptor().getMessageType(19); + getDescriptor().getMessageType(31); internal_static_google_cloud_aiplatform_v1_CoherenceSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CoherenceSpec_descriptor, @@ -1329,7 +1675,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", }); internal_static_google_cloud_aiplatform_v1_CoherenceResult_descriptor = - getDescriptor().getMessageType(20); + getDescriptor().getMessageType(32); internal_static_google_cloud_aiplatform_v1_CoherenceResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CoherenceResult_descriptor, @@ -1337,7 +1683,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_FluencyInput_descriptor = - getDescriptor().getMessageType(21); + getDescriptor().getMessageType(33); internal_static_google_cloud_aiplatform_v1_FluencyInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_FluencyInput_descriptor, @@ -1345,7 +1691,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_FluencyInstance_descriptor = - getDescriptor().getMessageType(22); + getDescriptor().getMessageType(34); internal_static_google_cloud_aiplatform_v1_FluencyInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_FluencyInstance_descriptor, @@ -1353,7 +1699,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", }); internal_static_google_cloud_aiplatform_v1_FluencySpec_descriptor = - getDescriptor().getMessageType(23); + getDescriptor().getMessageType(35); internal_static_google_cloud_aiplatform_v1_FluencySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_FluencySpec_descriptor, @@ -1361,7 +1707,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", }); internal_static_google_cloud_aiplatform_v1_FluencyResult_descriptor = - getDescriptor().getMessageType(24); + getDescriptor().getMessageType(36); internal_static_google_cloud_aiplatform_v1_FluencyResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_FluencyResult_descriptor, @@ -1369,7 +1715,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_SafetyInput_descriptor = - getDescriptor().getMessageType(25); + getDescriptor().getMessageType(37); internal_static_google_cloud_aiplatform_v1_SafetyInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SafetyInput_descriptor, @@ -1377,7 +1723,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_SafetyInstance_descriptor = - getDescriptor().getMessageType(26); + getDescriptor().getMessageType(38); internal_static_google_cloud_aiplatform_v1_SafetyInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SafetyInstance_descriptor, @@ -1385,7 +1731,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", }); internal_static_google_cloud_aiplatform_v1_SafetySpec_descriptor = - getDescriptor().getMessageType(27); + getDescriptor().getMessageType(39); internal_static_google_cloud_aiplatform_v1_SafetySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SafetySpec_descriptor, @@ -1393,7 +1739,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", }); internal_static_google_cloud_aiplatform_v1_SafetyResult_descriptor = - getDescriptor().getMessageType(28); + getDescriptor().getMessageType(40); internal_static_google_cloud_aiplatform_v1_SafetyResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SafetyResult_descriptor, @@ -1401,7 +1747,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_GroundednessInput_descriptor = - getDescriptor().getMessageType(29); + getDescriptor().getMessageType(41); internal_static_google_cloud_aiplatform_v1_GroundednessInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GroundednessInput_descriptor, @@ -1409,7 +1755,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_GroundednessInstance_descriptor = - getDescriptor().getMessageType(30); + getDescriptor().getMessageType(42); internal_static_google_cloud_aiplatform_v1_GroundednessInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GroundednessInstance_descriptor, @@ -1417,7 +1763,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Context", }); internal_static_google_cloud_aiplatform_v1_GroundednessSpec_descriptor = - getDescriptor().getMessageType(31); + getDescriptor().getMessageType(43); internal_static_google_cloud_aiplatform_v1_GroundednessSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GroundednessSpec_descriptor, @@ -1425,7 +1771,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", }); internal_static_google_cloud_aiplatform_v1_GroundednessResult_descriptor = - getDescriptor().getMessageType(32); + getDescriptor().getMessageType(44); internal_static_google_cloud_aiplatform_v1_GroundednessResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GroundednessResult_descriptor, @@ -1433,7 +1779,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_FulfillmentInput_descriptor = - getDescriptor().getMessageType(33); + getDescriptor().getMessageType(45); internal_static_google_cloud_aiplatform_v1_FulfillmentInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_FulfillmentInput_descriptor, @@ -1441,7 +1787,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_FulfillmentInstance_descriptor = - getDescriptor().getMessageType(34); + getDescriptor().getMessageType(46); internal_static_google_cloud_aiplatform_v1_FulfillmentInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_FulfillmentInstance_descriptor, @@ -1449,7 +1795,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Instruction", }); internal_static_google_cloud_aiplatform_v1_FulfillmentSpec_descriptor = - getDescriptor().getMessageType(35); + getDescriptor().getMessageType(47); internal_static_google_cloud_aiplatform_v1_FulfillmentSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_FulfillmentSpec_descriptor, @@ -1457,7 +1803,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", }); internal_static_google_cloud_aiplatform_v1_FulfillmentResult_descriptor = - getDescriptor().getMessageType(36); + getDescriptor().getMessageType(48); internal_static_google_cloud_aiplatform_v1_FulfillmentResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_FulfillmentResult_descriptor, @@ -1465,7 +1811,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_SummarizationQualityInput_descriptor = - getDescriptor().getMessageType(37); + getDescriptor().getMessageType(49); internal_static_google_cloud_aiplatform_v1_SummarizationQualityInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationQualityInput_descriptor, @@ -1473,7 +1819,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_SummarizationQualityInstance_descriptor = - getDescriptor().getMessageType(38); + getDescriptor().getMessageType(50); internal_static_google_cloud_aiplatform_v1_SummarizationQualityInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationQualityInstance_descriptor, @@ -1481,7 +1827,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_SummarizationQualitySpec_descriptor = - getDescriptor().getMessageType(39); + getDescriptor().getMessageType(51); internal_static_google_cloud_aiplatform_v1_SummarizationQualitySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationQualitySpec_descriptor, @@ -1489,7 +1835,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_SummarizationQualityResult_descriptor = - getDescriptor().getMessageType(40); + getDescriptor().getMessageType(52); internal_static_google_cloud_aiplatform_v1_SummarizationQualityResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationQualityResult_descriptor, @@ -1497,7 +1843,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityInput_descriptor = - getDescriptor().getMessageType(41); + getDescriptor().getMessageType(53); internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityInput_descriptor, @@ -1505,7 +1851,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityInstance_descriptor = - getDescriptor().getMessageType(42); + getDescriptor().getMessageType(54); internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityInstance_descriptor, @@ -1513,7 +1859,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "BaselinePrediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualitySpec_descriptor = - getDescriptor().getMessageType(43); + getDescriptor().getMessageType(55); internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualitySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualitySpec_descriptor, @@ -1521,7 +1867,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityResult_descriptor = - getDescriptor().getMessageType(44); + getDescriptor().getMessageType(56); internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseSummarizationQualityResult_descriptor, @@ -1529,7 +1875,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PairwiseChoice", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessInput_descriptor = - getDescriptor().getMessageType(45); + getDescriptor().getMessageType(57); internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessInput_descriptor, @@ -1537,7 +1883,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessInstance_descriptor = - getDescriptor().getMessageType(46); + getDescriptor().getMessageType(58); internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessInstance_descriptor, @@ -1545,7 +1891,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessSpec_descriptor = - getDescriptor().getMessageType(47); + getDescriptor().getMessageType(59); internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessSpec_descriptor, @@ -1553,7 +1899,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessResult_descriptor = - getDescriptor().getMessageType(48); + getDescriptor().getMessageType(60); internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationHelpfulnessResult_descriptor, @@ -1561,7 +1907,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityInput_descriptor = - getDescriptor().getMessageType(49); + getDescriptor().getMessageType(61); internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityInput_descriptor, @@ -1569,7 +1915,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityInstance_descriptor = - getDescriptor().getMessageType(50); + getDescriptor().getMessageType(62); internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityInstance_descriptor, @@ -1577,7 +1923,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_SummarizationVerbositySpec_descriptor = - getDescriptor().getMessageType(51); + getDescriptor().getMessageType(63); internal_static_google_cloud_aiplatform_v1_SummarizationVerbositySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationVerbositySpec_descriptor, @@ -1585,7 +1931,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityResult_descriptor = - getDescriptor().getMessageType(52); + getDescriptor().getMessageType(64); internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SummarizationVerbosityResult_descriptor, @@ -1593,7 +1939,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityInput_descriptor = - getDescriptor().getMessageType(53); + getDescriptor().getMessageType(65); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityInput_descriptor, @@ -1601,7 +1947,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityInstance_descriptor = - getDescriptor().getMessageType(54); + getDescriptor().getMessageType(66); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityInstance_descriptor, @@ -1609,7 +1955,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualitySpec_descriptor = - getDescriptor().getMessageType(55); + getDescriptor().getMessageType(67); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualitySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualitySpec_descriptor, @@ -1617,7 +1963,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityResult_descriptor = - getDescriptor().getMessageType(56); + getDescriptor().getMessageType(68); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringQualityResult_descriptor, @@ -1625,7 +1971,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityInput_descriptor = - getDescriptor().getMessageType(57); + getDescriptor().getMessageType(69); internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityInput_descriptor, @@ -1633,7 +1979,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityInstance_descriptor = - getDescriptor().getMessageType(58); + getDescriptor().getMessageType(70); internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityInstance_descriptor, @@ -1641,7 +1987,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "BaselinePrediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualitySpec_descriptor = - getDescriptor().getMessageType(59); + getDescriptor().getMessageType(71); internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualitySpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualitySpec_descriptor, @@ -1649,7 +1995,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityResult_descriptor = - getDescriptor().getMessageType(60); + getDescriptor().getMessageType(72); internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseQuestionAnsweringQualityResult_descriptor, @@ -1657,7 +2003,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PairwiseChoice", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceInput_descriptor = - getDescriptor().getMessageType(61); + getDescriptor().getMessageType(73); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceInput_descriptor, @@ -1665,7 +2011,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceInstance_descriptor = - getDescriptor().getMessageType(62); + getDescriptor().getMessageType(74); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceInstance_descriptor, @@ -1673,7 +2019,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceSpec_descriptor = - getDescriptor().getMessageType(63); + getDescriptor().getMessageType(75); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceSpec_descriptor, @@ -1681,7 +2027,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceResult_descriptor = - getDescriptor().getMessageType(64); + getDescriptor().getMessageType(76); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringRelevanceResult_descriptor, @@ -1689,7 +2035,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessInput_descriptor = - getDescriptor().getMessageType(65); + getDescriptor().getMessageType(77); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessInput_descriptor, @@ -1697,7 +2043,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessInstance_descriptor = - getDescriptor().getMessageType(66); + getDescriptor().getMessageType(78); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessInstance_descriptor, @@ -1705,7 +2051,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessSpec_descriptor = - getDescriptor().getMessageType(67); + getDescriptor().getMessageType(79); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessSpec_descriptor, @@ -1713,7 +2059,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessResult_descriptor = - getDescriptor().getMessageType(68); + getDescriptor().getMessageType(80); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringHelpfulnessResult_descriptor, @@ -1721,7 +2067,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessInput_descriptor = - getDescriptor().getMessageType(69); + getDescriptor().getMessageType(81); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessInput_descriptor, @@ -1729,7 +2075,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessInstance_descriptor = - getDescriptor().getMessageType(70); + getDescriptor().getMessageType(82); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessInstance_descriptor, @@ -1737,7 +2083,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Context", "Instruction", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessSpec_descriptor = - getDescriptor().getMessageType(71); + getDescriptor().getMessageType(83); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessSpec_descriptor, @@ -1745,7 +2091,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseReference", "Version", }); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessResult_descriptor = - getDescriptor().getMessageType(72); + getDescriptor().getMessageType(84); internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_QuestionAnsweringCorrectnessResult_descriptor, @@ -1753,7 +2099,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", "Explanation", "Confidence", }); internal_static_google_cloud_aiplatform_v1_PointwiseMetricInput_descriptor = - getDescriptor().getMessageType(73); + getDescriptor().getMessageType(85); internal_static_google_cloud_aiplatform_v1_PointwiseMetricInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PointwiseMetricInput_descriptor, @@ -1761,31 +2107,55 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_PointwiseMetricInstance_descriptor = - getDescriptor().getMessageType(74); + getDescriptor().getMessageType(86); internal_static_google_cloud_aiplatform_v1_PointwiseMetricInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PointwiseMetricInstance_descriptor, new java.lang.String[] { - "JsonInstance", "Instance", + "JsonInstance", "ContentMapInstance", "Instance", }); internal_static_google_cloud_aiplatform_v1_PointwiseMetricSpec_descriptor = - getDescriptor().getMessageType(75); + getDescriptor().getMessageType(87); internal_static_google_cloud_aiplatform_v1_PointwiseMetricSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PointwiseMetricSpec_descriptor, new java.lang.String[] { - "MetricPromptTemplate", + "MetricPromptTemplate", "SystemInstruction", "CustomOutputFormatConfig", + }); + internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_descriptor = + getDescriptor().getMessageType(88); + internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CustomOutputFormatConfig_descriptor, + new java.lang.String[] { + "ReturnRawOutput", "CustomOutputFormatConfig", }); internal_static_google_cloud_aiplatform_v1_PointwiseMetricResult_descriptor = - getDescriptor().getMessageType(76); + getDescriptor().getMessageType(89); internal_static_google_cloud_aiplatform_v1_PointwiseMetricResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PointwiseMetricResult_descriptor, new java.lang.String[] { - "Score", "Explanation", + "Score", "Explanation", "CustomOutput", + }); + internal_static_google_cloud_aiplatform_v1_CustomOutput_descriptor = + getDescriptor().getMessageType(90); + internal_static_google_cloud_aiplatform_v1_CustomOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CustomOutput_descriptor, + new java.lang.String[] { + "RawOutputs", "CustomOutput", + }); + internal_static_google_cloud_aiplatform_v1_RawOutput_descriptor = + getDescriptor().getMessageType(91); + internal_static_google_cloud_aiplatform_v1_RawOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_RawOutput_descriptor, + new java.lang.String[] { + "RawOutput", }); internal_static_google_cloud_aiplatform_v1_PairwiseMetricInput_descriptor = - getDescriptor().getMessageType(77); + getDescriptor().getMessageType(92); internal_static_google_cloud_aiplatform_v1_PairwiseMetricInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseMetricInput_descriptor, @@ -1793,31 +2163,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_PairwiseMetricInstance_descriptor = - getDescriptor().getMessageType(78); + getDescriptor().getMessageType(93); internal_static_google_cloud_aiplatform_v1_PairwiseMetricInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseMetricInstance_descriptor, new java.lang.String[] { - "JsonInstance", "Instance", + "JsonInstance", "ContentMapInstance", "Instance", }); internal_static_google_cloud_aiplatform_v1_PairwiseMetricSpec_descriptor = - getDescriptor().getMessageType(79); + getDescriptor().getMessageType(94); internal_static_google_cloud_aiplatform_v1_PairwiseMetricSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseMetricSpec_descriptor, new java.lang.String[] { "MetricPromptTemplate", + "CandidateResponseFieldName", + "BaselineResponseFieldName", + "SystemInstruction", + "CustomOutputFormatConfig", }); internal_static_google_cloud_aiplatform_v1_PairwiseMetricResult_descriptor = - getDescriptor().getMessageType(80); + getDescriptor().getMessageType(95); internal_static_google_cloud_aiplatform_v1_PairwiseMetricResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PairwiseMetricResult_descriptor, new java.lang.String[] { - "PairwiseChoice", "Explanation", + "PairwiseChoice", "Explanation", "CustomOutput", }); internal_static_google_cloud_aiplatform_v1_ToolCallValidInput_descriptor = - getDescriptor().getMessageType(81); + getDescriptor().getMessageType(96); internal_static_google_cloud_aiplatform_v1_ToolCallValidInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolCallValidInput_descriptor, @@ -1825,13 +2199,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instances", }); internal_static_google_cloud_aiplatform_v1_ToolCallValidSpec_descriptor = - getDescriptor().getMessageType(82); + getDescriptor().getMessageType(97); internal_static_google_cloud_aiplatform_v1_ToolCallValidSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolCallValidSpec_descriptor, new java.lang.String[] {}); internal_static_google_cloud_aiplatform_v1_ToolCallValidInstance_descriptor = - getDescriptor().getMessageType(83); + getDescriptor().getMessageType(98); internal_static_google_cloud_aiplatform_v1_ToolCallValidInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolCallValidInstance_descriptor, @@ -1839,7 +2213,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", }); internal_static_google_cloud_aiplatform_v1_ToolCallValidResults_descriptor = - getDescriptor().getMessageType(84); + getDescriptor().getMessageType(99); internal_static_google_cloud_aiplatform_v1_ToolCallValidResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolCallValidResults_descriptor, @@ -1847,7 +2221,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ToolCallValidMetricValues", }); internal_static_google_cloud_aiplatform_v1_ToolCallValidMetricValue_descriptor = - getDescriptor().getMessageType(85); + getDescriptor().getMessageType(100); internal_static_google_cloud_aiplatform_v1_ToolCallValidMetricValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolCallValidMetricValue_descriptor, @@ -1855,7 +2229,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_cloud_aiplatform_v1_ToolNameMatchInput_descriptor = - getDescriptor().getMessageType(86); + getDescriptor().getMessageType(101); internal_static_google_cloud_aiplatform_v1_ToolNameMatchInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolNameMatchInput_descriptor, @@ -1863,13 +2237,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instances", }); internal_static_google_cloud_aiplatform_v1_ToolNameMatchSpec_descriptor = - getDescriptor().getMessageType(87); + getDescriptor().getMessageType(102); internal_static_google_cloud_aiplatform_v1_ToolNameMatchSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolNameMatchSpec_descriptor, new java.lang.String[] {}); internal_static_google_cloud_aiplatform_v1_ToolNameMatchInstance_descriptor = - getDescriptor().getMessageType(88); + getDescriptor().getMessageType(103); internal_static_google_cloud_aiplatform_v1_ToolNameMatchInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolNameMatchInstance_descriptor, @@ -1877,7 +2251,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", }); internal_static_google_cloud_aiplatform_v1_ToolNameMatchResults_descriptor = - getDescriptor().getMessageType(89); + getDescriptor().getMessageType(104); internal_static_google_cloud_aiplatform_v1_ToolNameMatchResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolNameMatchResults_descriptor, @@ -1885,7 +2259,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ToolNameMatchMetricValues", }); internal_static_google_cloud_aiplatform_v1_ToolNameMatchMetricValue_descriptor = - getDescriptor().getMessageType(90); + getDescriptor().getMessageType(105); internal_static_google_cloud_aiplatform_v1_ToolNameMatchMetricValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolNameMatchMetricValue_descriptor, @@ -1893,7 +2267,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchInput_descriptor = - getDescriptor().getMessageType(91); + getDescriptor().getMessageType(106); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchInput_descriptor, @@ -1901,13 +2275,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instances", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchSpec_descriptor = - getDescriptor().getMessageType(92); + getDescriptor().getMessageType(107); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchSpec_descriptor, new java.lang.String[] {}); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchInstance_descriptor = - getDescriptor().getMessageType(93); + getDescriptor().getMessageType(108); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchInstance_descriptor, @@ -1915,7 +2289,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchResults_descriptor = - getDescriptor().getMessageType(94); + getDescriptor().getMessageType(109); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchResults_descriptor, @@ -1923,7 +2297,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ToolParameterKeyMatchMetricValues", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchMetricValue_descriptor = - getDescriptor().getMessageType(95); + getDescriptor().getMessageType(110); internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchMetricValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKeyMatchMetricValue_descriptor, @@ -1931,7 +2305,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchInput_descriptor = - getDescriptor().getMessageType(96); + getDescriptor().getMessageType(111); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchInput_descriptor, @@ -1939,7 +2313,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instances", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchSpec_descriptor = - getDescriptor().getMessageType(97); + getDescriptor().getMessageType(112); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchSpec_descriptor, @@ -1947,7 +2321,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UseStrictStringMatch", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchInstance_descriptor = - getDescriptor().getMessageType(98); + getDescriptor().getMessageType(113); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchInstance_descriptor, @@ -1955,7 +2329,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchResults_descriptor = - getDescriptor().getMessageType(99); + getDescriptor().getMessageType(114); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchResults_descriptor, @@ -1963,7 +2337,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ToolParameterKvMatchMetricValues", }); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchMetricValue_descriptor = - getDescriptor().getMessageType(100); + getDescriptor().getMessageType(115); internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchMetricValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ToolParameterKVMatchMetricValue_descriptor, @@ -1971,7 +2345,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_cloud_aiplatform_v1_CometInput_descriptor = - getDescriptor().getMessageType(101); + getDescriptor().getMessageType(116); internal_static_google_cloud_aiplatform_v1_CometInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CometInput_descriptor, @@ -1979,7 +2353,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_CometSpec_descriptor = - getDescriptor().getMessageType(102); + getDescriptor().getMessageType(117); internal_static_google_cloud_aiplatform_v1_CometSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CometSpec_descriptor, @@ -1987,7 +2361,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", "SourceLanguage", "TargetLanguage", }); internal_static_google_cloud_aiplatform_v1_CometInstance_descriptor = - getDescriptor().getMessageType(103); + getDescriptor().getMessageType(118); internal_static_google_cloud_aiplatform_v1_CometInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CometInstance_descriptor, @@ -1995,7 +2369,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Source", }); internal_static_google_cloud_aiplatform_v1_CometResult_descriptor = - getDescriptor().getMessageType(104); + getDescriptor().getMessageType(119); internal_static_google_cloud_aiplatform_v1_CometResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CometResult_descriptor, @@ -2003,7 +2377,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_cloud_aiplatform_v1_MetricxInput_descriptor = - getDescriptor().getMessageType(105); + getDescriptor().getMessageType(120); internal_static_google_cloud_aiplatform_v1_MetricxInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_MetricxInput_descriptor, @@ -2011,7 +2385,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MetricSpec", "Instance", }); internal_static_google_cloud_aiplatform_v1_MetricxSpec_descriptor = - getDescriptor().getMessageType(106); + getDescriptor().getMessageType(121); internal_static_google_cloud_aiplatform_v1_MetricxSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_MetricxSpec_descriptor, @@ -2019,7 +2393,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", "SourceLanguage", "TargetLanguage", }); internal_static_google_cloud_aiplatform_v1_MetricxInstance_descriptor = - getDescriptor().getMessageType(107); + getDescriptor().getMessageType(122); internal_static_google_cloud_aiplatform_v1_MetricxInstance_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_MetricxInstance_descriptor, @@ -2027,18 +2401,46 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Prediction", "Reference", "Source", }); internal_static_google_cloud_aiplatform_v1_MetricxResult_descriptor = - getDescriptor().getMessageType(108); + getDescriptor().getMessageType(123); internal_static_google_cloud_aiplatform_v1_MetricxResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_MetricxResult_descriptor, new java.lang.String[] { "Score", }); + internal_static_google_cloud_aiplatform_v1_ContentMap_descriptor = + getDescriptor().getMessageType(124); + internal_static_google_cloud_aiplatform_v1_ContentMap_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ContentMap_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_descriptor = + internal_static_google_cloud_aiplatform_v1_ContentMap_descriptor.getNestedType(0); + internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ContentMap_Contents_descriptor, + new java.lang.String[] { + "Contents", + }); + internal_static_google_cloud_aiplatform_v1_ContentMap_ValuesEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_ContentMap_descriptor.getNestedType(1); + internal_static_google_cloud_aiplatform_v1_ContentMap_ValuesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ContentMap_ValuesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); 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.aiplatform.v1.ContentProto.getDescriptor(); + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LLMBasedMetricSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LLMBasedMetricSpec.java new file mode 100644 index 000000000000..7536754f3b6a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LLMBasedMetricSpec.java @@ -0,0 +1,2164 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Specification for an LLM based metric.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.LLMBasedMetricSpec} + */ +@com.google.protobuf.Generated +public final class LLMBasedMetricSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.LLMBasedMetricSpec) + LLMBasedMetricSpecOrBuilder { + 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= */ "", + "LLMBasedMetricSpec"); + } + + // Use LLMBasedMetricSpec.newBuilder() to construct. + private LLMBasedMetricSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LLMBasedMetricSpec() { + metricPromptTemplate_ = ""; + systemInstruction_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.class, + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.Builder.class); + } + + private int bitField0_; + private int rubricsSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object rubricsSource_; + + public enum RubricsSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RUBRIC_GROUP_KEY(4), + PREDEFINED_RUBRIC_GENERATION_SPEC(6), + RUBRICSSOURCE_NOT_SET(0); + private final int value; + + private RubricsSourceCase(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 RubricsSourceCase valueOf(int value) { + return forNumber(value); + } + + public static RubricsSourceCase forNumber(int value) { + switch (value) { + case 4: + return RUBRIC_GROUP_KEY; + case 6: + return PREDEFINED_RUBRIC_GENERATION_SPEC; + case 0: + return RUBRICSSOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RubricsSourceCase getRubricsSourceCase() { + return RubricsSourceCase.forNumber(rubricsSourceCase_); + } + + public static final int RUBRIC_GROUP_KEY_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Use a pre-defined group of rubrics associated with the input.
+   * Refers to a key in the rubric_groups map of EvaluationInstance.
+   * 
+ * + * string rubric_group_key = 4; + * + * @return Whether the rubricGroupKey field is set. + */ + public boolean hasRubricGroupKey() { + return rubricsSourceCase_ == 4; + } + + /** + * + * + *
+   * Use a pre-defined group of rubrics associated with the input.
+   * Refers to a key in the rubric_groups map of EvaluationInstance.
+   * 
+ * + * string rubric_group_key = 4; + * + * @return The rubricGroupKey. + */ + public java.lang.String getRubricGroupKey() { + java.lang.Object ref = ""; + if (rubricsSourceCase_ == 4) { + ref = rubricsSource_; + } + if (ref instanceof java.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 (rubricsSourceCase_ == 4) { + rubricsSource_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Use a pre-defined group of rubrics associated with the input.
+   * Refers to a key in the rubric_groups map of EvaluationInstance.
+   * 
+ * + * string rubric_group_key = 4; + * + * @return The bytes for rubricGroupKey. + */ + public com.google.protobuf.ByteString getRubricGroupKeyBytes() { + java.lang.Object ref = ""; + if (rubricsSourceCase_ == 4) { + ref = rubricsSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (rubricsSourceCase_ == 4) { + rubricsSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREDEFINED_RUBRIC_GENERATION_SPEC_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Dynamically generate rubrics using a predefined spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + * + * @return Whether the predefinedRubricGenerationSpec field is set. + */ + @java.lang.Override + public boolean hasPredefinedRubricGenerationSpec() { + return rubricsSourceCase_ == 6; + } + + /** + * + * + *
+   * Dynamically generate rubrics using a predefined spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + * + * @return The predefinedRubricGenerationSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec getPredefinedRubricGenerationSpec() { + if (rubricsSourceCase_ == 6) { + return (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) rubricsSource_; + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Dynamically generate rubrics using a predefined spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder + getPredefinedRubricGenerationSpecOrBuilder() { + if (rubricsSourceCase_ == 6) { + return (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) rubricsSource_; + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + + public static final int METRIC_PROMPT_TEMPLATE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object metricPromptTemplate_ = ""; + + /** + * + * + *
+   * Required. Template for the prompt sent to the judge model.
+   * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricPromptTemplate field is set. + */ + @java.lang.Override + public boolean hasMetricPromptTemplate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Template for the prompt sent to the judge model.
+   * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricPromptTemplate. + */ + @java.lang.Override + public java.lang.String getMetricPromptTemplate() { + java.lang.Object ref = metricPromptTemplate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricPromptTemplate_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Template for the prompt sent to the judge model.
+   * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for metricPromptTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricPromptTemplateBytes() { + java.lang.Object ref = metricPromptTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricPromptTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object systemInstruction_ = ""; + + /** + * + * + *
+   * Optional. System instructions for the judge model.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the systemInstruction field is set. + */ + @java.lang.Override + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. System instructions for the judge model.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + @java.lang.Override + public java.lang.String getSystemInstruction() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + systemInstruction_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. System instructions for the judge model.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSystemInstructionBytes() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + systemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JUDGE_AUTORATER_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.AutoraterConfig judgeAutoraterConfig_; + + /** + * + * + *
+   * Optional. Optional configuration for the judge LLM (Autorater).
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the judgeAutoraterConfig field is set. + */ + @java.lang.Override + public boolean hasJudgeAutoraterConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Optional configuration for the judge LLM (Autorater).
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The judgeAutoraterConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutoraterConfig getJudgeAutoraterConfig() { + return judgeAutoraterConfig_ == null + ? com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance() + : judgeAutoraterConfig_; + } + + /** + * + * + *
+   * Optional. Optional configuration for the judge LLM (Autorater).
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder + getJudgeAutoraterConfigOrBuilder() { + return judgeAutoraterConfig_ == null + ? com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance() + : judgeAutoraterConfig_; + } + + public static final int ADDITIONAL_CONFIG_FIELD_NUMBER = 7; + private com.google.protobuf.Struct additionalConfig_; + + /** + * + * + *
+   * Optional. Optional additional configuration for the metric.
+   * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalConfig field is set. + */ + @java.lang.Override + public boolean hasAdditionalConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Optional additional configuration for the metric.
+   * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalConfig. + */ + @java.lang.Override + public com.google.protobuf.Struct getAdditionalConfig() { + return additionalConfig_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : additionalConfig_; + } + + /** + * + * + *
+   * Optional. Optional additional configuration for the metric.
+   * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getAdditionalConfigOrBuilder() { + return additionalConfig_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : additionalConfig_; + } + + 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, metricPromptTemplate_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, systemInstruction_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getJudgeAutoraterConfig()); + } + if (rubricsSourceCase_ == 4) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, rubricsSource_); + } + if (rubricsSourceCase_ == 6) { + output.writeMessage(6, (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) rubricsSource_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getAdditionalConfig()); + } + 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, metricPromptTemplate_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, systemInstruction_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getJudgeAutoraterConfig()); + } + if (rubricsSourceCase_ == 4) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, rubricsSource_); + } + if (rubricsSourceCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) rubricsSource_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAdditionalConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.LLMBasedMetricSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec other = + (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) obj; + + if (hasMetricPromptTemplate() != other.hasMetricPromptTemplate()) return false; + if (hasMetricPromptTemplate()) { + if (!getMetricPromptTemplate().equals(other.getMetricPromptTemplate())) return false; + } + if (hasSystemInstruction() != other.hasSystemInstruction()) return false; + if (hasSystemInstruction()) { + if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; + } + if (hasJudgeAutoraterConfig() != other.hasJudgeAutoraterConfig()) return false; + if (hasJudgeAutoraterConfig()) { + if (!getJudgeAutoraterConfig().equals(other.getJudgeAutoraterConfig())) return false; + } + if (hasAdditionalConfig() != other.hasAdditionalConfig()) return false; + if (hasAdditionalConfig()) { + if (!getAdditionalConfig().equals(other.getAdditionalConfig())) return false; + } + if (!getRubricsSourceCase().equals(other.getRubricsSourceCase())) return false; + switch (rubricsSourceCase_) { + case 4: + if (!getRubricGroupKey().equals(other.getRubricGroupKey())) return false; + break; + case 6: + if (!getPredefinedRubricGenerationSpec().equals(other.getPredefinedRubricGenerationSpec())) + 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 (hasMetricPromptTemplate()) { + hash = (37 * hash) + METRIC_PROMPT_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getMetricPromptTemplate().hashCode(); + } + if (hasSystemInstruction()) { + hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getSystemInstruction().hashCode(); + } + if (hasJudgeAutoraterConfig()) { + hash = (37 * hash) + JUDGE_AUTORATER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getJudgeAutoraterConfig().hashCode(); + } + if (hasAdditionalConfig()) { + hash = (37 * hash) + ADDITIONAL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalConfig().hashCode(); + } + switch (rubricsSourceCase_) { + case 4: + hash = (37 * hash) + RUBRIC_GROUP_KEY_FIELD_NUMBER; + hash = (53 * hash) + getRubricGroupKey().hashCode(); + break; + case 6: + hash = (37 * hash) + PREDEFINED_RUBRIC_GENERATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPredefinedRubricGenerationSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.LLMBasedMetricSpec 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 an LLM based metric.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.LLMBasedMetricSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.LLMBasedMetricSpec) + com.google.cloud.aiplatform.v1.LLMBasedMetricSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.class, + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetJudgeAutoraterConfigFieldBuilder(); + internalGetAdditionalConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (predefinedRubricGenerationSpecBuilder_ != null) { + predefinedRubricGenerationSpecBuilder_.clear(); + } + metricPromptTemplate_ = ""; + systemInstruction_ = ""; + judgeAutoraterConfig_ = null; + if (judgeAutoraterConfigBuilder_ != null) { + judgeAutoraterConfigBuilder_.dispose(); + judgeAutoraterConfigBuilder_ = null; + } + additionalConfig_ = null; + if (additionalConfigBuilder_ != null) { + additionalConfigBuilder_.dispose(); + additionalConfigBuilder_ = null; + } + rubricsSourceCase_ = 0; + rubricsSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_LLMBasedMetricSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.LLMBasedMetricSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.LLMBasedMetricSpec build() { + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.LLMBasedMetricSpec buildPartial() { + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec result = + new com.google.cloud.aiplatform.v1.LLMBasedMetricSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.LLMBasedMetricSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metricPromptTemplate_ = metricPromptTemplate_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.systemInstruction_ = systemInstruction_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.judgeAutoraterConfig_ = + judgeAutoraterConfigBuilder_ == null + ? judgeAutoraterConfig_ + : judgeAutoraterConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.additionalConfig_ = + additionalConfigBuilder_ == null ? additionalConfig_ : additionalConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.LLMBasedMetricSpec result) { + result.rubricsSourceCase_ = rubricsSourceCase_; + result.rubricsSource_ = this.rubricsSource_; + if (rubricsSourceCase_ == 6 && predefinedRubricGenerationSpecBuilder_ != null) { + result.rubricsSource_ = predefinedRubricGenerationSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.LLMBasedMetricSpec other) { + if (other == com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance()) + return this; + if (other.hasMetricPromptTemplate()) { + metricPromptTemplate_ = other.metricPromptTemplate_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSystemInstruction()) { + systemInstruction_ = other.systemInstruction_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasJudgeAutoraterConfig()) { + mergeJudgeAutoraterConfig(other.getJudgeAutoraterConfig()); + } + if (other.hasAdditionalConfig()) { + mergeAdditionalConfig(other.getAdditionalConfig()); + } + switch (other.getRubricsSourceCase()) { + case RUBRIC_GROUP_KEY: + { + rubricsSourceCase_ = 4; + rubricsSource_ = other.rubricsSource_; + onChanged(); + break; + } + case PREDEFINED_RUBRIC_GENERATION_SPEC: + { + mergePredefinedRubricGenerationSpec(other.getPredefinedRubricGenerationSpec()); + break; + } + case RUBRICSSOURCE_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: + { + metricPromptTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + systemInstruction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetJudgeAutoraterConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + rubricsSourceCase_ = 4; + rubricsSource_ = s; + break; + } // case 34 + case 50: + { + input.readMessage( + internalGetPredefinedRubricGenerationSpecFieldBuilder().getBuilder(), + extensionRegistry); + rubricsSourceCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetAdditionalConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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 rubricsSourceCase_ = 0; + private java.lang.Object rubricsSource_; + + public RubricsSourceCase getRubricsSourceCase() { + return RubricsSourceCase.forNumber(rubricsSourceCase_); + } + + public Builder clearRubricsSource() { + rubricsSourceCase_ = 0; + rubricsSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Use a pre-defined group of rubrics associated with the input.
+     * Refers to a key in the rubric_groups map of EvaluationInstance.
+     * 
+ * + * string rubric_group_key = 4; + * + * @return Whether the rubricGroupKey field is set. + */ + @java.lang.Override + public boolean hasRubricGroupKey() { + return rubricsSourceCase_ == 4; + } + + /** + * + * + *
+     * Use a pre-defined group of rubrics associated with the input.
+     * Refers to a key in the rubric_groups map of EvaluationInstance.
+     * 
+ * + * string rubric_group_key = 4; + * + * @return The rubricGroupKey. + */ + @java.lang.Override + public java.lang.String getRubricGroupKey() { + java.lang.Object ref = ""; + if (rubricsSourceCase_ == 4) { + ref = rubricsSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (rubricsSourceCase_ == 4) { + rubricsSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Use a pre-defined group of rubrics associated with the input.
+     * Refers to a key in the rubric_groups map of EvaluationInstance.
+     * 
+ * + * string rubric_group_key = 4; + * + * @return The bytes for rubricGroupKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRubricGroupKeyBytes() { + java.lang.Object ref = ""; + if (rubricsSourceCase_ == 4) { + ref = rubricsSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (rubricsSourceCase_ == 4) { + rubricsSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Use a pre-defined group of rubrics associated with the input.
+     * Refers to a key in the rubric_groups map of EvaluationInstance.
+     * 
+ * + * string rubric_group_key = 4; + * + * @param value The rubricGroupKey to set. + * @return This builder for chaining. + */ + public Builder setRubricGroupKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rubricsSourceCase_ = 4; + rubricsSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Use a pre-defined group of rubrics associated with the input.
+     * Refers to a key in the rubric_groups map of EvaluationInstance.
+     * 
+ * + * string rubric_group_key = 4; + * + * @return This builder for chaining. + */ + public Builder clearRubricGroupKey() { + if (rubricsSourceCase_ == 4) { + rubricsSourceCase_ = 0; + rubricsSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Use a pre-defined group of rubrics associated with the input.
+     * Refers to a key in the rubric_groups map of EvaluationInstance.
+     * 
+ * + * string rubric_group_key = 4; + * + * @param value The bytes for rubricGroupKey to set. + * @return This builder for chaining. + */ + public Builder setRubricGroupKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rubricsSourceCase_ = 4; + rubricsSource_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PredefinedMetricSpec, + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder> + predefinedRubricGenerationSpecBuilder_; + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + * + * @return Whether the predefinedRubricGenerationSpec field is set. + */ + @java.lang.Override + public boolean hasPredefinedRubricGenerationSpec() { + return rubricsSourceCase_ == 6; + } + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + * + * @return The predefinedRubricGenerationSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec getPredefinedRubricGenerationSpec() { + if (predefinedRubricGenerationSpecBuilder_ == null) { + if (rubricsSourceCase_ == 6) { + return (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) rubricsSource_; + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } else { + if (rubricsSourceCase_ == 6) { + return predefinedRubricGenerationSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + public Builder setPredefinedRubricGenerationSpec( + com.google.cloud.aiplatform.v1.PredefinedMetricSpec value) { + if (predefinedRubricGenerationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rubricsSource_ = value; + onChanged(); + } else { + predefinedRubricGenerationSpecBuilder_.setMessage(value); + } + rubricsSourceCase_ = 6; + return this; + } + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + public Builder setPredefinedRubricGenerationSpec( + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder builderForValue) { + if (predefinedRubricGenerationSpecBuilder_ == null) { + rubricsSource_ = builderForValue.build(); + onChanged(); + } else { + predefinedRubricGenerationSpecBuilder_.setMessage(builderForValue.build()); + } + rubricsSourceCase_ = 6; + return this; + } + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + public Builder mergePredefinedRubricGenerationSpec( + com.google.cloud.aiplatform.v1.PredefinedMetricSpec value) { + if (predefinedRubricGenerationSpecBuilder_ == null) { + if (rubricsSourceCase_ == 6 + && rubricsSource_ + != com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance()) { + rubricsSource_ = + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.newBuilder( + (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) rubricsSource_) + .mergeFrom(value) + .buildPartial(); + } else { + rubricsSource_ = value; + } + onChanged(); + } else { + if (rubricsSourceCase_ == 6) { + predefinedRubricGenerationSpecBuilder_.mergeFrom(value); + } else { + predefinedRubricGenerationSpecBuilder_.setMessage(value); + } + } + rubricsSourceCase_ = 6; + return this; + } + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + public Builder clearPredefinedRubricGenerationSpec() { + if (predefinedRubricGenerationSpecBuilder_ == null) { + if (rubricsSourceCase_ == 6) { + rubricsSourceCase_ = 0; + rubricsSource_ = null; + onChanged(); + } + } else { + if (rubricsSourceCase_ == 6) { + rubricsSourceCase_ = 0; + rubricsSource_ = null; + } + predefinedRubricGenerationSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder + getPredefinedRubricGenerationSpecBuilder() { + return internalGetPredefinedRubricGenerationSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder + getPredefinedRubricGenerationSpecOrBuilder() { + if ((rubricsSourceCase_ == 6) && (predefinedRubricGenerationSpecBuilder_ != null)) { + return predefinedRubricGenerationSpecBuilder_.getMessageOrBuilder(); + } else { + if (rubricsSourceCase_ == 6) { + return (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) rubricsSource_; + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Dynamically generate rubrics using a predefined spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PredefinedMetricSpec, + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder> + internalGetPredefinedRubricGenerationSpecFieldBuilder() { + if (predefinedRubricGenerationSpecBuilder_ == null) { + if (!(rubricsSourceCase_ == 6)) { + rubricsSource_ = com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + predefinedRubricGenerationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PredefinedMetricSpec, + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) rubricsSource_, + getParentForChildren(), + isClean()); + rubricsSource_ = null; + } + rubricsSourceCase_ = 6; + onChanged(); + return predefinedRubricGenerationSpecBuilder_; + } + + private java.lang.Object metricPromptTemplate_ = ""; + + /** + * + * + *
+     * Required. Template for the prompt sent to the judge model.
+     * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricPromptTemplate field is set. + */ + public boolean hasMetricPromptTemplate() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Template for the prompt sent to the judge model.
+     * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricPromptTemplate. + */ + public java.lang.String getMetricPromptTemplate() { + java.lang.Object ref = metricPromptTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricPromptTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Template for the prompt sent to the judge model.
+     * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for metricPromptTemplate. + */ + public com.google.protobuf.ByteString getMetricPromptTemplateBytes() { + java.lang.Object ref = metricPromptTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricPromptTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Template for the prompt sent to the judge model.
+     * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The metricPromptTemplate to set. + * @return This builder for chaining. + */ + public Builder setMetricPromptTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + metricPromptTemplate_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Template for the prompt sent to the judge model.
+     * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMetricPromptTemplate() { + metricPromptTemplate_ = getDefaultInstance().getMetricPromptTemplate(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Template for the prompt sent to the judge model.
+     * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for metricPromptTemplate to set. + * @return This builder for chaining. + */ + public Builder setMetricPromptTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + metricPromptTemplate_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object systemInstruction_ = ""; + + /** + * + * + *
+     * Optional. System instructions for the judge model.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. System instructions for the judge model.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + public java.lang.String getSystemInstruction() { + java.lang.Object ref = systemInstruction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + systemInstruction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. System instructions for the judge model.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for systemInstruction. + */ + public com.google.protobuf.ByteString getSystemInstructionBytes() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + systemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. System instructions for the judge model.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The systemInstruction to set. + * @return This builder for chaining. + */ + public Builder setSystemInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + systemInstruction_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. System instructions for the judge model.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSystemInstruction() { + systemInstruction_ = getDefaultInstance().getSystemInstruction(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. System instructions for the judge model.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for systemInstruction to set. + * @return This builder for chaining. + */ + public Builder setSystemInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + systemInstruction_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.AutoraterConfig judgeAutoraterConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AutoraterConfig, + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder, + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder> + judgeAutoraterConfigBuilder_; + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the judgeAutoraterConfig field is set. + */ + public boolean hasJudgeAutoraterConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The judgeAutoraterConfig. + */ + public com.google.cloud.aiplatform.v1.AutoraterConfig getJudgeAutoraterConfig() { + if (judgeAutoraterConfigBuilder_ == null) { + return judgeAutoraterConfig_ == null + ? com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance() + : judgeAutoraterConfig_; + } else { + return judgeAutoraterConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setJudgeAutoraterConfig(com.google.cloud.aiplatform.v1.AutoraterConfig value) { + if (judgeAutoraterConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + judgeAutoraterConfig_ = value; + } else { + judgeAutoraterConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setJudgeAutoraterConfig( + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder builderForValue) { + if (judgeAutoraterConfigBuilder_ == null) { + judgeAutoraterConfig_ = builderForValue.build(); + } else { + judgeAutoraterConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeJudgeAutoraterConfig(com.google.cloud.aiplatform.v1.AutoraterConfig value) { + if (judgeAutoraterConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && judgeAutoraterConfig_ != null + && judgeAutoraterConfig_ + != com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance()) { + getJudgeAutoraterConfigBuilder().mergeFrom(value); + } else { + judgeAutoraterConfig_ = value; + } + } else { + judgeAutoraterConfigBuilder_.mergeFrom(value); + } + if (judgeAutoraterConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearJudgeAutoraterConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + judgeAutoraterConfig_ = null; + if (judgeAutoraterConfigBuilder_ != null) { + judgeAutoraterConfigBuilder_.dispose(); + judgeAutoraterConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.AutoraterConfig.Builder getJudgeAutoraterConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetJudgeAutoraterConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder + getJudgeAutoraterConfigOrBuilder() { + if (judgeAutoraterConfigBuilder_ != null) { + return judgeAutoraterConfigBuilder_.getMessageOrBuilder(); + } else { + return judgeAutoraterConfig_ == null + ? com.google.cloud.aiplatform.v1.AutoraterConfig.getDefaultInstance() + : judgeAutoraterConfig_; + } + } + + /** + * + * + *
+     * Optional. Optional configuration for the judge LLM (Autorater).
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AutoraterConfig, + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder, + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder> + internalGetJudgeAutoraterConfigFieldBuilder() { + if (judgeAutoraterConfigBuilder_ == null) { + judgeAutoraterConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.AutoraterConfig, + com.google.cloud.aiplatform.v1.AutoraterConfig.Builder, + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder>( + getJudgeAutoraterConfig(), getParentForChildren(), isClean()); + judgeAutoraterConfig_ = null; + } + return judgeAutoraterConfigBuilder_; + } + + private com.google.protobuf.Struct additionalConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + additionalConfigBuilder_; + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalConfig field is set. + */ + public boolean hasAdditionalConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalConfig. + */ + public com.google.protobuf.Struct getAdditionalConfig() { + if (additionalConfigBuilder_ == null) { + return additionalConfig_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : additionalConfig_; + } else { + return additionalConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdditionalConfig(com.google.protobuf.Struct value) { + if (additionalConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + additionalConfig_ = value; + } else { + additionalConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdditionalConfig(com.google.protobuf.Struct.Builder builderForValue) { + if (additionalConfigBuilder_ == null) { + additionalConfig_ = builderForValue.build(); + } else { + additionalConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAdditionalConfig(com.google.protobuf.Struct value) { + if (additionalConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && additionalConfig_ != null + && additionalConfig_ != com.google.protobuf.Struct.getDefaultInstance()) { + getAdditionalConfigBuilder().mergeFrom(value); + } else { + additionalConfig_ = value; + } + } else { + additionalConfigBuilder_.mergeFrom(value); + } + if (additionalConfig_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdditionalConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + additionalConfig_ = null; + if (additionalConfigBuilder_ != null) { + additionalConfigBuilder_.dispose(); + additionalConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getAdditionalConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetAdditionalConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getAdditionalConfigOrBuilder() { + if (additionalConfigBuilder_ != null) { + return additionalConfigBuilder_.getMessageOrBuilder(); + } else { + return additionalConfig_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : additionalConfig_; + } + } + + /** + * + * + *
+     * Optional. Optional additional configuration for the metric.
+     * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetAdditionalConfigFieldBuilder() { + if (additionalConfigBuilder_ == null) { + additionalConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getAdditionalConfig(), getParentForChildren(), isClean()); + additionalConfig_ = null; + } + return additionalConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.LLMBasedMetricSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.LLMBasedMetricSpec) + private static final com.google.cloud.aiplatform.v1.LLMBasedMetricSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.LLMBasedMetricSpec(); + } + + public static com.google.cloud.aiplatform.v1.LLMBasedMetricSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LLMBasedMetricSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.LLMBasedMetricSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LLMBasedMetricSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LLMBasedMetricSpecOrBuilder.java new file mode 100644 index 000000000000..6f71b058a1c6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LLMBasedMetricSpecOrBuilder.java @@ -0,0 +1,280 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface LLMBasedMetricSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.LLMBasedMetricSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Use a pre-defined group of rubrics associated with the input.
+   * Refers to a key in the rubric_groups map of EvaluationInstance.
+   * 
+ * + * string rubric_group_key = 4; + * + * @return Whether the rubricGroupKey field is set. + */ + boolean hasRubricGroupKey(); + + /** + * + * + *
+   * Use a pre-defined group of rubrics associated with the input.
+   * Refers to a key in the rubric_groups map of EvaluationInstance.
+   * 
+ * + * string rubric_group_key = 4; + * + * @return The rubricGroupKey. + */ + java.lang.String getRubricGroupKey(); + + /** + * + * + *
+   * Use a pre-defined group of rubrics associated with the input.
+   * Refers to a key in the rubric_groups map of EvaluationInstance.
+   * 
+ * + * string rubric_group_key = 4; + * + * @return The bytes for rubricGroupKey. + */ + com.google.protobuf.ByteString getRubricGroupKeyBytes(); + + /** + * + * + *
+   * Dynamically generate rubrics using a predefined spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + * + * @return Whether the predefinedRubricGenerationSpec field is set. + */ + boolean hasPredefinedRubricGenerationSpec(); + + /** + * + * + *
+   * Dynamically generate rubrics using a predefined spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + * + * @return The predefinedRubricGenerationSpec. + */ + com.google.cloud.aiplatform.v1.PredefinedMetricSpec getPredefinedRubricGenerationSpec(); + + /** + * + * + *
+   * Dynamically generate rubrics using a predefined spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_rubric_generation_spec = 6; + * + */ + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder + getPredefinedRubricGenerationSpecOrBuilder(); + + /** + * + * + *
+   * Required. Template for the prompt sent to the judge model.
+   * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricPromptTemplate field is set. + */ + boolean hasMetricPromptTemplate(); + + /** + * + * + *
+   * Required. Template for the prompt sent to the judge model.
+   * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricPromptTemplate. + */ + java.lang.String getMetricPromptTemplate(); + + /** + * + * + *
+   * Required. Template for the prompt sent to the judge model.
+   * 
+ * + * optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for metricPromptTemplate. + */ + com.google.protobuf.ByteString getMetricPromptTemplateBytes(); + + /** + * + * + *
+   * Optional. System instructions for the judge model.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the systemInstruction field is set. + */ + boolean hasSystemInstruction(); + + /** + * + * + *
+   * Optional. System instructions for the judge model.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + java.lang.String getSystemInstruction(); + + /** + * + * + *
+   * Optional. System instructions for the judge model.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + com.google.protobuf.ByteString getSystemInstructionBytes(); + + /** + * + * + *
+   * Optional. Optional configuration for the judge LLM (Autorater).
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the judgeAutoraterConfig field is set. + */ + boolean hasJudgeAutoraterConfig(); + + /** + * + * + *
+   * Optional. Optional configuration for the judge LLM (Autorater).
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The judgeAutoraterConfig. + */ + com.google.cloud.aiplatform.v1.AutoraterConfig getJudgeAutoraterConfig(); + + /** + * + * + *
+   * Optional. Optional configuration for the judge LLM (Autorater).
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.AutoraterConfig judge_autorater_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.AutoraterConfigOrBuilder getJudgeAutoraterConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Optional additional configuration for the metric.
+   * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the additionalConfig field is set. + */ + boolean hasAdditionalConfig(); + + /** + * + * + *
+   * Optional. Optional additional configuration for the metric.
+   * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalConfig. + */ + com.google.protobuf.Struct getAdditionalConfig(); + + /** + * + * + *
+   * Optional. Optional additional configuration for the metric.
+   * 
+ * + * + * optional .google.protobuf.Struct additional_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getAdditionalConfigOrBuilder(); + + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.RubricsSourceCase getRubricsSourceCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Metric.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Metric.java new file mode 100644 index 000000000000..31aee36daf5b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Metric.java @@ -0,0 +1,3799 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The metric used for running evaluations.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Metric} + */ +@com.google.protobuf.Generated +public final class Metric extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Metric) + MetricOrBuilder { + 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= */ "", + "Metric"); + } + + // Use Metric.newBuilder() to construct. + private Metric(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Metric() { + aggregationMetrics_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Metric.class, + com.google.cloud.aiplatform.v1.Metric.Builder.class); + } + + /** + * + * + *
+   * The per-metric statistics on evaluation results supported by
+   * `EvaluationService.EvaluateDataset`.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.Metric.AggregationMetric} + */ + public enum AggregationMetric implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified aggregation metric.
+     * 
+ * + * AGGREGATION_METRIC_UNSPECIFIED = 0; + */ + AGGREGATION_METRIC_UNSPECIFIED(0), + /** + * + * + *
+     * Average aggregation metric. Not supported for Pairwise metric.
+     * 
+ * + * AVERAGE = 1; + */ + AVERAGE(1), + /** + * + * + *
+     * Mode aggregation metric.
+     * 
+ * + * MODE = 2; + */ + MODE(2), + /** + * + * + *
+     * Standard deviation aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * STANDARD_DEVIATION = 3; + */ + STANDARD_DEVIATION(3), + /** + * + * + *
+     * Variance aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * VARIANCE = 4; + */ + VARIANCE(4), + /** + * + * + *
+     * Minimum aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * MINIMUM = 5; + */ + MINIMUM(5), + /** + * + * + *
+     * Maximum aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * MAXIMUM = 6; + */ + MAXIMUM(6), + /** + * + * + *
+     * Median aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * MEDIAN = 7; + */ + MEDIAN(7), + /** + * + * + *
+     * 90th percentile aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * PERCENTILE_P90 = 8; + */ + PERCENTILE_P90(8), + /** + * + * + *
+     * 95th percentile aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * PERCENTILE_P95 = 9; + */ + PERCENTILE_P95(9), + /** + * + * + *
+     * 99th percentile aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * PERCENTILE_P99 = 10; + */ + PERCENTILE_P99(10), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AggregationMetric"); + } + + /** + * + * + *
+     * Unspecified aggregation metric.
+     * 
+ * + * AGGREGATION_METRIC_UNSPECIFIED = 0; + */ + public static final int AGGREGATION_METRIC_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Average aggregation metric. Not supported for Pairwise metric.
+     * 
+ * + * AVERAGE = 1; + */ + public static final int AVERAGE_VALUE = 1; + + /** + * + * + *
+     * Mode aggregation metric.
+     * 
+ * + * MODE = 2; + */ + public static final int MODE_VALUE = 2; + + /** + * + * + *
+     * Standard deviation aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * STANDARD_DEVIATION = 3; + */ + public static final int STANDARD_DEVIATION_VALUE = 3; + + /** + * + * + *
+     * Variance aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * VARIANCE = 4; + */ + public static final int VARIANCE_VALUE = 4; + + /** + * + * + *
+     * Minimum aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * MINIMUM = 5; + */ + public static final int MINIMUM_VALUE = 5; + + /** + * + * + *
+     * Maximum aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * MAXIMUM = 6; + */ + public static final int MAXIMUM_VALUE = 6; + + /** + * + * + *
+     * Median aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * MEDIAN = 7; + */ + public static final int MEDIAN_VALUE = 7; + + /** + * + * + *
+     * 90th percentile aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * PERCENTILE_P90 = 8; + */ + public static final int PERCENTILE_P90_VALUE = 8; + + /** + * + * + *
+     * 95th percentile aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * PERCENTILE_P95 = 9; + */ + public static final int PERCENTILE_P95_VALUE = 9; + + /** + * + * + *
+     * 99th percentile aggregation metric. Not supported for pairwise metric.
+     * 
+ * + * PERCENTILE_P99 = 10; + */ + public static final int PERCENTILE_P99_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 AggregationMetric 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 AggregationMetric forNumber(int value) { + switch (value) { + case 0: + return AGGREGATION_METRIC_UNSPECIFIED; + case 1: + return AVERAGE; + case 2: + return MODE; + case 3: + return STANDARD_DEVIATION; + case 4: + return VARIANCE; + case 5: + return MINIMUM; + case 6: + return MAXIMUM; + case 7: + return MEDIAN; + case 8: + return PERCENTILE_P90; + case 9: + return PERCENTILE_P95; + case 10: + return PERCENTILE_P99; + 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 AggregationMetric findValueByNumber(int number) { + return AggregationMetric.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.v1.Metric.getDescriptor().getEnumTypes().get(0); + } + + private static final AggregationMetric[] VALUES = values(); + + public static AggregationMetric 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 AggregationMetric(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.Metric.AggregationMetric) + } + + private int metricSpecCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object metricSpec_; + + public enum MetricSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PREDEFINED_METRIC_SPEC(8), + COMPUTATION_BASED_METRIC_SPEC(9), + LLM_BASED_METRIC_SPEC(10), + POINTWISE_METRIC_SPEC(2), + PAIRWISE_METRIC_SPEC(3), + EXACT_MATCH_SPEC(4), + BLEU_SPEC(5), + ROUGE_SPEC(6), + METRICSPEC_NOT_SET(0); + private final int value; + + private MetricSpecCase(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 MetricSpecCase valueOf(int value) { + return forNumber(value); + } + + public static MetricSpecCase forNumber(int value) { + switch (value) { + case 8: + return PREDEFINED_METRIC_SPEC; + case 9: + return COMPUTATION_BASED_METRIC_SPEC; + case 10: + return LLM_BASED_METRIC_SPEC; + case 2: + return POINTWISE_METRIC_SPEC; + case 3: + return PAIRWISE_METRIC_SPEC; + case 4: + return EXACT_MATCH_SPEC; + case 5: + return BLEU_SPEC; + case 6: + return ROUGE_SPEC; + case 0: + return METRICSPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MetricSpecCase getMetricSpecCase() { + return MetricSpecCase.forNumber(metricSpecCase_); + } + + public static final int PREDEFINED_METRIC_SPEC_FIELD_NUMBER = 8; + + /** + * + * + *
+   * The spec for a pre-defined metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + * + * @return Whether the predefinedMetricSpec field is set. + */ + @java.lang.Override + public boolean hasPredefinedMetricSpec() { + return metricSpecCase_ == 8; + } + + /** + * + * + *
+   * The spec for a pre-defined metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + * + * @return The predefinedMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec getPredefinedMetricSpec() { + if (metricSpecCase_ == 8) { + return (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * The spec for a pre-defined metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder + getPredefinedMetricSpecOrBuilder() { + if (metricSpecCase_ == 8) { + return (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + + public static final int COMPUTATION_BASED_METRIC_SPEC_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Spec for a computation based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + * + * @return Whether the computationBasedMetricSpec field is set. + */ + @java.lang.Override + public boolean hasComputationBasedMetricSpec() { + return metricSpecCase_ == 9; + } + + /** + * + * + *
+   * Spec for a computation based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + * + * @return The computationBasedMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec getComputationBasedMetricSpec() { + if (metricSpecCase_ == 9) { + return (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Spec for a computation based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpecOrBuilder + getComputationBasedMetricSpecOrBuilder() { + if (metricSpecCase_ == 9) { + return (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance(); + } + + public static final int LLM_BASED_METRIC_SPEC_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Spec for an LLM based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + * + * @return Whether the llmBasedMetricSpec field is set. + */ + @java.lang.Override + public boolean hasLlmBasedMetricSpec() { + return metricSpecCase_ == 10; + } + + /** + * + * + *
+   * Spec for an LLM based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + * + * @return The llmBasedMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.LLMBasedMetricSpec getLlmBasedMetricSpec() { + if (metricSpecCase_ == 10) { + return (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Spec for an LLM based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.LLMBasedMetricSpecOrBuilder + getLlmBasedMetricSpecOrBuilder() { + if (metricSpecCase_ == 10) { + return (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance(); + } + + public static final int POINTWISE_METRIC_SPEC_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Spec for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + * + * @return Whether the pointwiseMetricSpec field is set. + */ + @java.lang.Override + public boolean hasPointwiseMetricSpec() { + return metricSpecCase_ == 2; + } + + /** + * + * + *
+   * Spec for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + * + * @return The pointwiseMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PointwiseMetricSpec getPointwiseMetricSpec() { + if (metricSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.PointwiseMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PointwiseMetricSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Spec for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PointwiseMetricSpecOrBuilder + getPointwiseMetricSpecOrBuilder() { + if (metricSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.PointwiseMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PointwiseMetricSpec.getDefaultInstance(); + } + + public static final int PAIRWISE_METRIC_SPEC_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Spec for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + * + * @return Whether the pairwiseMetricSpec field is set. + */ + @java.lang.Override + public boolean hasPairwiseMetricSpec() { + return metricSpecCase_ == 3; + } + + /** + * + * + *
+   * Spec for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + * + * @return The pairwiseMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PairwiseMetricSpec getPairwiseMetricSpec() { + if (metricSpecCase_ == 3) { + return (com.google.cloud.aiplatform.v1.PairwiseMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PairwiseMetricSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Spec for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PairwiseMetricSpecOrBuilder + getPairwiseMetricSpecOrBuilder() { + if (metricSpecCase_ == 3) { + return (com.google.cloud.aiplatform.v1.PairwiseMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PairwiseMetricSpec.getDefaultInstance(); + } + + public static final int EXACT_MATCH_SPEC_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Spec for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + * + * @return Whether the exactMatchSpec field is set. + */ + @java.lang.Override + public boolean hasExactMatchSpec() { + return metricSpecCase_ == 4; + } + + /** + * + * + *
+   * Spec for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + * + * @return The exactMatchSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExactMatchSpec getExactMatchSpec() { + if (metricSpecCase_ == 4) { + return (com.google.cloud.aiplatform.v1.ExactMatchSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.ExactMatchSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Spec for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExactMatchSpecOrBuilder getExactMatchSpecOrBuilder() { + if (metricSpecCase_ == 4) { + return (com.google.cloud.aiplatform.v1.ExactMatchSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.ExactMatchSpec.getDefaultInstance(); + } + + public static final int BLEU_SPEC_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Spec for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + * + * @return Whether the bleuSpec field is set. + */ + @java.lang.Override + public boolean hasBleuSpec() { + return metricSpecCase_ == 5; + } + + /** + * + * + *
+   * Spec for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + * + * @return The bleuSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BleuSpec getBleuSpec() { + if (metricSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.BleuSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.BleuSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Spec for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BleuSpecOrBuilder getBleuSpecOrBuilder() { + if (metricSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.BleuSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.BleuSpec.getDefaultInstance(); + } + + public static final int ROUGE_SPEC_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Spec for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + * + * @return Whether the rougeSpec field is set. + */ + @java.lang.Override + public boolean hasRougeSpec() { + return metricSpecCase_ == 6; + } + + /** + * + * + *
+   * Spec for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + * + * @return The rougeSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RougeSpec getRougeSpec() { + if (metricSpecCase_ == 6) { + return (com.google.cloud.aiplatform.v1.RougeSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.RougeSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Spec for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RougeSpecOrBuilder getRougeSpecOrBuilder() { + if (metricSpecCase_ == 6) { + return (com.google.cloud.aiplatform.v1.RougeSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.RougeSpec.getDefaultInstance(); + } + + public static final int AGGREGATION_METRICS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList aggregationMetrics_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.aiplatform.v1.Metric.AggregationMetric> + aggregationMetrics_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.aiplatform.v1.Metric.AggregationMetric>() { + public com.google.cloud.aiplatform.v1.Metric.AggregationMetric convert(int from) { + com.google.cloud.aiplatform.v1.Metric.AggregationMetric result = + com.google.cloud.aiplatform.v1.Metric.AggregationMetric.forNumber(from); + return result == null + ? com.google.cloud.aiplatform.v1.Metric.AggregationMetric.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the aggregationMetrics. + */ + @java.lang.Override + public java.util.List + getAggregationMetricsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.aiplatform.v1.Metric.AggregationMetric>( + aggregationMetrics_, aggregationMetrics_converter_); + } + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of aggregationMetrics. + */ + @java.lang.Override + public int getAggregationMetricsCount() { + return aggregationMetrics_.size(); + } + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The aggregationMetrics at the given index. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Metric.AggregationMetric getAggregationMetrics(int index) { + return aggregationMetrics_converter_.convert(aggregationMetrics_.getInt(index)); + } + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for aggregationMetrics. + */ + @java.lang.Override + public java.util.List getAggregationMetricsValueList() { + return aggregationMetrics_; + } + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of aggregationMetrics at the given index. + */ + @java.lang.Override + public int getAggregationMetricsValue(int index) { + return aggregationMetrics_.getInt(index); + } + + private int aggregationMetricsMemoizedSerializedSize; + + 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 (getAggregationMetricsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(aggregationMetricsMemoizedSerializedSize); + } + for (int i = 0; i < aggregationMetrics_.size(); i++) { + output.writeEnumNoTag(aggregationMetrics_.getInt(i)); + } + if (metricSpecCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1.PointwiseMetricSpec) metricSpec_); + } + if (metricSpecCase_ == 3) { + output.writeMessage(3, (com.google.cloud.aiplatform.v1.PairwiseMetricSpec) metricSpec_); + } + if (metricSpecCase_ == 4) { + output.writeMessage(4, (com.google.cloud.aiplatform.v1.ExactMatchSpec) metricSpec_); + } + if (metricSpecCase_ == 5) { + output.writeMessage(5, (com.google.cloud.aiplatform.v1.BleuSpec) metricSpec_); + } + if (metricSpecCase_ == 6) { + output.writeMessage(6, (com.google.cloud.aiplatform.v1.RougeSpec) metricSpec_); + } + if (metricSpecCase_ == 8) { + output.writeMessage(8, (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) metricSpec_); + } + if (metricSpecCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) metricSpec_); + } + if (metricSpecCase_ == 10) { + output.writeMessage(10, (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) metricSpec_); + } + 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 < aggregationMetrics_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + aggregationMetrics_.getInt(i)); + } + size += dataSize; + if (!getAggregationMetricsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + aggregationMetricsMemoizedSerializedSize = dataSize; + } + if (metricSpecCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.PointwiseMetricSpec) metricSpec_); + } + if (metricSpecCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.aiplatform.v1.PairwiseMetricSpec) metricSpec_); + } + if (metricSpecCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.aiplatform.v1.ExactMatchSpec) metricSpec_); + } + if (metricSpecCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.aiplatform.v1.BleuSpec) metricSpec_); + } + if (metricSpecCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.aiplatform.v1.RougeSpec) metricSpec_); + } + if (metricSpecCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) metricSpec_); + } + if (metricSpecCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) metricSpec_); + } + if (metricSpecCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) metricSpec_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.Metric)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Metric other = (com.google.cloud.aiplatform.v1.Metric) obj; + + if (!aggregationMetrics_.equals(other.aggregationMetrics_)) return false; + if (!getMetricSpecCase().equals(other.getMetricSpecCase())) return false; + switch (metricSpecCase_) { + case 8: + if (!getPredefinedMetricSpec().equals(other.getPredefinedMetricSpec())) return false; + break; + case 9: + if (!getComputationBasedMetricSpec().equals(other.getComputationBasedMetricSpec())) + return false; + break; + case 10: + if (!getLlmBasedMetricSpec().equals(other.getLlmBasedMetricSpec())) return false; + break; + case 2: + if (!getPointwiseMetricSpec().equals(other.getPointwiseMetricSpec())) return false; + break; + case 3: + if (!getPairwiseMetricSpec().equals(other.getPairwiseMetricSpec())) return false; + break; + case 4: + if (!getExactMatchSpec().equals(other.getExactMatchSpec())) return false; + break; + case 5: + if (!getBleuSpec().equals(other.getBleuSpec())) return false; + break; + case 6: + if (!getRougeSpec().equals(other.getRougeSpec())) 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 (getAggregationMetricsCount() > 0) { + hash = (37 * hash) + AGGREGATION_METRICS_FIELD_NUMBER; + hash = (53 * hash) + aggregationMetrics_.hashCode(); + } + switch (metricSpecCase_) { + case 8: + hash = (37 * hash) + PREDEFINED_METRIC_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPredefinedMetricSpec().hashCode(); + break; + case 9: + hash = (37 * hash) + COMPUTATION_BASED_METRIC_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getComputationBasedMetricSpec().hashCode(); + break; + case 10: + hash = (37 * hash) + LLM_BASED_METRIC_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getLlmBasedMetricSpec().hashCode(); + break; + case 2: + hash = (37 * hash) + POINTWISE_METRIC_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPointwiseMetricSpec().hashCode(); + break; + case 3: + hash = (37 * hash) + PAIRWISE_METRIC_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPairwiseMetricSpec().hashCode(); + break; + case 4: + hash = (37 * hash) + EXACT_MATCH_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getExactMatchSpec().hashCode(); + break; + case 5: + hash = (37 * hash) + BLEU_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBleuSpec().hashCode(); + break; + case 6: + hash = (37 * hash) + ROUGE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getRougeSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Metric parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Metric parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Metric parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.Metric 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 metric used for running evaluations.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Metric} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Metric) + com.google.cloud.aiplatform.v1.MetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Metric.class, + com.google.cloud.aiplatform.v1.Metric.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Metric.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (predefinedMetricSpecBuilder_ != null) { + predefinedMetricSpecBuilder_.clear(); + } + if (computationBasedMetricSpecBuilder_ != null) { + computationBasedMetricSpecBuilder_.clear(); + } + if (llmBasedMetricSpecBuilder_ != null) { + llmBasedMetricSpecBuilder_.clear(); + } + if (pointwiseMetricSpecBuilder_ != null) { + pointwiseMetricSpecBuilder_.clear(); + } + if (pairwiseMetricSpecBuilder_ != null) { + pairwiseMetricSpecBuilder_.clear(); + } + if (exactMatchSpecBuilder_ != null) { + exactMatchSpecBuilder_.clear(); + } + if (bleuSpecBuilder_ != null) { + bleuSpecBuilder_.clear(); + } + if (rougeSpecBuilder_ != null) { + rougeSpecBuilder_.clear(); + } + aggregationMetrics_ = emptyIntList(); + metricSpecCase_ = 0; + metricSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_Metric_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Metric getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Metric.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Metric build() { + com.google.cloud.aiplatform.v1.Metric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Metric buildPartial() { + com.google.cloud.aiplatform.v1.Metric result = + new com.google.cloud.aiplatform.v1.Metric(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.Metric result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000100) != 0)) { + aggregationMetrics_.makeImmutable(); + result.aggregationMetrics_ = aggregationMetrics_; + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.Metric result) { + result.metricSpecCase_ = metricSpecCase_; + result.metricSpec_ = this.metricSpec_; + if (metricSpecCase_ == 8 && predefinedMetricSpecBuilder_ != null) { + result.metricSpec_ = predefinedMetricSpecBuilder_.build(); + } + if (metricSpecCase_ == 9 && computationBasedMetricSpecBuilder_ != null) { + result.metricSpec_ = computationBasedMetricSpecBuilder_.build(); + } + if (metricSpecCase_ == 10 && llmBasedMetricSpecBuilder_ != null) { + result.metricSpec_ = llmBasedMetricSpecBuilder_.build(); + } + if (metricSpecCase_ == 2 && pointwiseMetricSpecBuilder_ != null) { + result.metricSpec_ = pointwiseMetricSpecBuilder_.build(); + } + if (metricSpecCase_ == 3 && pairwiseMetricSpecBuilder_ != null) { + result.metricSpec_ = pairwiseMetricSpecBuilder_.build(); + } + if (metricSpecCase_ == 4 && exactMatchSpecBuilder_ != null) { + result.metricSpec_ = exactMatchSpecBuilder_.build(); + } + if (metricSpecCase_ == 5 && bleuSpecBuilder_ != null) { + result.metricSpec_ = bleuSpecBuilder_.build(); + } + if (metricSpecCase_ == 6 && rougeSpecBuilder_ != null) { + result.metricSpec_ = rougeSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.Metric) { + return mergeFrom((com.google.cloud.aiplatform.v1.Metric) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Metric other) { + if (other == com.google.cloud.aiplatform.v1.Metric.getDefaultInstance()) return this; + if (!other.aggregationMetrics_.isEmpty()) { + if (aggregationMetrics_.isEmpty()) { + aggregationMetrics_ = other.aggregationMetrics_; + aggregationMetrics_.makeImmutable(); + bitField0_ |= 0x00000100; + } else { + ensureAggregationMetricsIsMutable(); + aggregationMetrics_.addAll(other.aggregationMetrics_); + } + onChanged(); + } + switch (other.getMetricSpecCase()) { + case PREDEFINED_METRIC_SPEC: + { + mergePredefinedMetricSpec(other.getPredefinedMetricSpec()); + break; + } + case COMPUTATION_BASED_METRIC_SPEC: + { + mergeComputationBasedMetricSpec(other.getComputationBasedMetricSpec()); + break; + } + case LLM_BASED_METRIC_SPEC: + { + mergeLlmBasedMetricSpec(other.getLlmBasedMetricSpec()); + break; + } + case POINTWISE_METRIC_SPEC: + { + mergePointwiseMetricSpec(other.getPointwiseMetricSpec()); + break; + } + case PAIRWISE_METRIC_SPEC: + { + mergePairwiseMetricSpec(other.getPairwiseMetricSpec()); + break; + } + case EXACT_MATCH_SPEC: + { + mergeExactMatchSpec(other.getExactMatchSpec()); + break; + } + case BLEU_SPEC: + { + mergeBleuSpec(other.getBleuSpec()); + break; + } + case ROUGE_SPEC: + { + mergeRougeSpec(other.getRougeSpec()); + break; + } + case METRICSPEC_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 tmpRaw = input.readEnum(); + ensureAggregationMetricsIsMutable(); + aggregationMetrics_.addInt(tmpRaw); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAggregationMetricsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + aggregationMetrics_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetPointwiseMetricSpecFieldBuilder().getBuilder(), extensionRegistry); + metricSpecCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetPairwiseMetricSpecFieldBuilder().getBuilder(), extensionRegistry); + metricSpecCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetExactMatchSpecFieldBuilder().getBuilder(), extensionRegistry); + metricSpecCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetBleuSpecFieldBuilder().getBuilder(), extensionRegistry); + metricSpecCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetRougeSpecFieldBuilder().getBuilder(), extensionRegistry); + metricSpecCase_ = 6; + break; + } // case 50 + case 66: + { + input.readMessage( + internalGetPredefinedMetricSpecFieldBuilder().getBuilder(), extensionRegistry); + metricSpecCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetComputationBasedMetricSpecFieldBuilder().getBuilder(), + extensionRegistry); + metricSpecCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetLlmBasedMetricSpecFieldBuilder().getBuilder(), extensionRegistry); + metricSpecCase_ = 10; + 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 metricSpecCase_ = 0; + private java.lang.Object metricSpec_; + + public MetricSpecCase getMetricSpecCase() { + return MetricSpecCase.forNumber(metricSpecCase_); + } + + public Builder clearMetricSpec() { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PredefinedMetricSpec, + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder> + predefinedMetricSpecBuilder_; + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + * + * @return Whether the predefinedMetricSpec field is set. + */ + @java.lang.Override + public boolean hasPredefinedMetricSpec() { + return metricSpecCase_ == 8; + } + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + * + * @return The predefinedMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec getPredefinedMetricSpec() { + if (predefinedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 8) { + return (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } else { + if (metricSpecCase_ == 8) { + return predefinedMetricSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + public Builder setPredefinedMetricSpec( + com.google.cloud.aiplatform.v1.PredefinedMetricSpec value) { + if (predefinedMetricSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpec_ = value; + onChanged(); + } else { + predefinedMetricSpecBuilder_.setMessage(value); + } + metricSpecCase_ = 8; + return this; + } + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + public Builder setPredefinedMetricSpec( + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder builderForValue) { + if (predefinedMetricSpecBuilder_ == null) { + metricSpec_ = builderForValue.build(); + onChanged(); + } else { + predefinedMetricSpecBuilder_.setMessage(builderForValue.build()); + } + metricSpecCase_ = 8; + return this; + } + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + public Builder mergePredefinedMetricSpec( + com.google.cloud.aiplatform.v1.PredefinedMetricSpec value) { + if (predefinedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 8 + && metricSpec_ + != com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance()) { + metricSpec_ = + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.newBuilder( + (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) metricSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + metricSpec_ = value; + } + onChanged(); + } else { + if (metricSpecCase_ == 8) { + predefinedMetricSpecBuilder_.mergeFrom(value); + } else { + predefinedMetricSpecBuilder_.setMessage(value); + } + } + metricSpecCase_ = 8; + return this; + } + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + public Builder clearPredefinedMetricSpec() { + if (predefinedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 8) { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + } + } else { + if (metricSpecCase_ == 8) { + metricSpecCase_ = 0; + metricSpec_ = null; + } + predefinedMetricSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder + getPredefinedMetricSpecBuilder() { + return internalGetPredefinedMetricSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder + getPredefinedMetricSpecOrBuilder() { + if ((metricSpecCase_ == 8) && (predefinedMetricSpecBuilder_ != null)) { + return predefinedMetricSpecBuilder_.getMessageOrBuilder(); + } else { + if (metricSpecCase_ == 8) { + return (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The spec for a pre-defined metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PredefinedMetricSpec, + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder> + internalGetPredefinedMetricSpecFieldBuilder() { + if (predefinedMetricSpecBuilder_ == null) { + if (!(metricSpecCase_ == 8)) { + metricSpec_ = com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + predefinedMetricSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PredefinedMetricSpec, + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) metricSpec_, + getParentForChildren(), + isClean()); + metricSpec_ = null; + } + metricSpecCase_ = 8; + onChanged(); + return predefinedMetricSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec, + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpecOrBuilder> + computationBasedMetricSpecBuilder_; + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + * + * @return Whether the computationBasedMetricSpec field is set. + */ + @java.lang.Override + public boolean hasComputationBasedMetricSpec() { + return metricSpecCase_ == 9; + } + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + * + * @return The computationBasedMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec + getComputationBasedMetricSpec() { + if (computationBasedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 9) { + return (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance(); + } else { + if (metricSpecCase_ == 9) { + return computationBasedMetricSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + public Builder setComputationBasedMetricSpec( + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec value) { + if (computationBasedMetricSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpec_ = value; + onChanged(); + } else { + computationBasedMetricSpecBuilder_.setMessage(value); + } + metricSpecCase_ = 9; + return this; + } + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + public Builder setComputationBasedMetricSpec( + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.Builder builderForValue) { + if (computationBasedMetricSpecBuilder_ == null) { + metricSpec_ = builderForValue.build(); + onChanged(); + } else { + computationBasedMetricSpecBuilder_.setMessage(builderForValue.build()); + } + metricSpecCase_ = 9; + return this; + } + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + public Builder mergeComputationBasedMetricSpec( + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec value) { + if (computationBasedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 9 + && metricSpec_ + != com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance()) { + metricSpec_ = + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.newBuilder( + (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) metricSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + metricSpec_ = value; + } + onChanged(); + } else { + if (metricSpecCase_ == 9) { + computationBasedMetricSpecBuilder_.mergeFrom(value); + } else { + computationBasedMetricSpecBuilder_.setMessage(value); + } + } + metricSpecCase_ = 9; + return this; + } + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + public Builder clearComputationBasedMetricSpec() { + if (computationBasedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 9) { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + } + } else { + if (metricSpecCase_ == 9) { + metricSpecCase_ = 0; + metricSpec_ = null; + } + computationBasedMetricSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.Builder + getComputationBasedMetricSpecBuilder() { + return internalGetComputationBasedMetricSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ComputationBasedMetricSpecOrBuilder + getComputationBasedMetricSpecOrBuilder() { + if ((metricSpecCase_ == 9) && (computationBasedMetricSpecBuilder_ != null)) { + return computationBasedMetricSpecBuilder_.getMessageOrBuilder(); + } else { + if (metricSpecCase_ == 9) { + return (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for a computation based metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec, + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpecOrBuilder> + internalGetComputationBasedMetricSpecFieldBuilder() { + if (computationBasedMetricSpecBuilder_ == null) { + if (!(metricSpecCase_ == 9)) { + metricSpec_ = + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.getDefaultInstance(); + } + computationBasedMetricSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec, + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec) metricSpec_, + getParentForChildren(), + isClean()); + metricSpec_ = null; + } + metricSpecCase_ = 9; + onChanged(); + return computationBasedMetricSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec, + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.LLMBasedMetricSpecOrBuilder> + llmBasedMetricSpecBuilder_; + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + * + * @return Whether the llmBasedMetricSpec field is set. + */ + @java.lang.Override + public boolean hasLlmBasedMetricSpec() { + return metricSpecCase_ == 10; + } + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + * + * @return The llmBasedMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.LLMBasedMetricSpec getLlmBasedMetricSpec() { + if (llmBasedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 10) { + return (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance(); + } else { + if (metricSpecCase_ == 10) { + return llmBasedMetricSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + public Builder setLlmBasedMetricSpec(com.google.cloud.aiplatform.v1.LLMBasedMetricSpec value) { + if (llmBasedMetricSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpec_ = value; + onChanged(); + } else { + llmBasedMetricSpecBuilder_.setMessage(value); + } + metricSpecCase_ = 10; + return this; + } + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + public Builder setLlmBasedMetricSpec( + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.Builder builderForValue) { + if (llmBasedMetricSpecBuilder_ == null) { + metricSpec_ = builderForValue.build(); + onChanged(); + } else { + llmBasedMetricSpecBuilder_.setMessage(builderForValue.build()); + } + metricSpecCase_ = 10; + return this; + } + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + public Builder mergeLlmBasedMetricSpec( + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec value) { + if (llmBasedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 10 + && metricSpec_ + != com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance()) { + metricSpec_ = + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.newBuilder( + (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) metricSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + metricSpec_ = value; + } + onChanged(); + } else { + if (metricSpecCase_ == 10) { + llmBasedMetricSpecBuilder_.mergeFrom(value); + } else { + llmBasedMetricSpecBuilder_.setMessage(value); + } + } + metricSpecCase_ = 10; + return this; + } + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + public Builder clearLlmBasedMetricSpec() { + if (llmBasedMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 10) { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + } + } else { + if (metricSpecCase_ == 10) { + metricSpecCase_ = 0; + metricSpec_ = null; + } + llmBasedMetricSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + public com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.Builder + getLlmBasedMetricSpecBuilder() { + return internalGetLlmBasedMetricSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.LLMBasedMetricSpecOrBuilder + getLlmBasedMetricSpecOrBuilder() { + if ((metricSpecCase_ == 10) && (llmBasedMetricSpecBuilder_ != null)) { + return llmBasedMetricSpecBuilder_.getMessageOrBuilder(); + } else { + if (metricSpecCase_ == 10) { + return (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for an LLM based metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec, + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.LLMBasedMetricSpecOrBuilder> + internalGetLlmBasedMetricSpecFieldBuilder() { + if (llmBasedMetricSpecBuilder_ == null) { + if (!(metricSpecCase_ == 10)) { + metricSpec_ = com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.getDefaultInstance(); + } + llmBasedMetricSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec, + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec.Builder, + com.google.cloud.aiplatform.v1.LLMBasedMetricSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.LLMBasedMetricSpec) metricSpec_, + getParentForChildren(), + isClean()); + metricSpec_ = null; + } + metricSpecCase_ = 10; + onChanged(); + return llmBasedMetricSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PointwiseMetricSpec, + com.google.cloud.aiplatform.v1.PointwiseMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PointwiseMetricSpecOrBuilder> + pointwiseMetricSpecBuilder_; + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + * + * @return Whether the pointwiseMetricSpec field is set. + */ + @java.lang.Override + public boolean hasPointwiseMetricSpec() { + return metricSpecCase_ == 2; + } + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + * + * @return The pointwiseMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PointwiseMetricSpec getPointwiseMetricSpec() { + if (pointwiseMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.PointwiseMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PointwiseMetricSpec.getDefaultInstance(); + } else { + if (metricSpecCase_ == 2) { + return pointwiseMetricSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PointwiseMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + public Builder setPointwiseMetricSpec( + com.google.cloud.aiplatform.v1.PointwiseMetricSpec value) { + if (pointwiseMetricSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpec_ = value; + onChanged(); + } else { + pointwiseMetricSpecBuilder_.setMessage(value); + } + metricSpecCase_ = 2; + return this; + } + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + public Builder setPointwiseMetricSpec( + com.google.cloud.aiplatform.v1.PointwiseMetricSpec.Builder builderForValue) { + if (pointwiseMetricSpecBuilder_ == null) { + metricSpec_ = builderForValue.build(); + onChanged(); + } else { + pointwiseMetricSpecBuilder_.setMessage(builderForValue.build()); + } + metricSpecCase_ = 2; + return this; + } + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + public Builder mergePointwiseMetricSpec( + com.google.cloud.aiplatform.v1.PointwiseMetricSpec value) { + if (pointwiseMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 2 + && metricSpec_ + != com.google.cloud.aiplatform.v1.PointwiseMetricSpec.getDefaultInstance()) { + metricSpec_ = + com.google.cloud.aiplatform.v1.PointwiseMetricSpec.newBuilder( + (com.google.cloud.aiplatform.v1.PointwiseMetricSpec) metricSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + metricSpec_ = value; + } + onChanged(); + } else { + if (metricSpecCase_ == 2) { + pointwiseMetricSpecBuilder_.mergeFrom(value); + } else { + pointwiseMetricSpecBuilder_.setMessage(value); + } + } + metricSpecCase_ = 2; + return this; + } + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + public Builder clearPointwiseMetricSpec() { + if (pointwiseMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 2) { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + } + } else { + if (metricSpecCase_ == 2) { + metricSpecCase_ = 0; + metricSpec_ = null; + } + pointwiseMetricSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + public com.google.cloud.aiplatform.v1.PointwiseMetricSpec.Builder + getPointwiseMetricSpecBuilder() { + return internalGetPointwiseMetricSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PointwiseMetricSpecOrBuilder + getPointwiseMetricSpecOrBuilder() { + if ((metricSpecCase_ == 2) && (pointwiseMetricSpecBuilder_ != null)) { + return pointwiseMetricSpecBuilder_.getMessageOrBuilder(); + } else { + if (metricSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.PointwiseMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PointwiseMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for pointwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PointwiseMetricSpec, + com.google.cloud.aiplatform.v1.PointwiseMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PointwiseMetricSpecOrBuilder> + internalGetPointwiseMetricSpecFieldBuilder() { + if (pointwiseMetricSpecBuilder_ == null) { + if (!(metricSpecCase_ == 2)) { + metricSpec_ = com.google.cloud.aiplatform.v1.PointwiseMetricSpec.getDefaultInstance(); + } + pointwiseMetricSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PointwiseMetricSpec, + com.google.cloud.aiplatform.v1.PointwiseMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PointwiseMetricSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.PointwiseMetricSpec) metricSpec_, + getParentForChildren(), + isClean()); + metricSpec_ = null; + } + metricSpecCase_ = 2; + onChanged(); + return pointwiseMetricSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PairwiseMetricSpec, + com.google.cloud.aiplatform.v1.PairwiseMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PairwiseMetricSpecOrBuilder> + pairwiseMetricSpecBuilder_; + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + * + * @return Whether the pairwiseMetricSpec field is set. + */ + @java.lang.Override + public boolean hasPairwiseMetricSpec() { + return metricSpecCase_ == 3; + } + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + * + * @return The pairwiseMetricSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PairwiseMetricSpec getPairwiseMetricSpec() { + if (pairwiseMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 3) { + return (com.google.cloud.aiplatform.v1.PairwiseMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PairwiseMetricSpec.getDefaultInstance(); + } else { + if (metricSpecCase_ == 3) { + return pairwiseMetricSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PairwiseMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + public Builder setPairwiseMetricSpec(com.google.cloud.aiplatform.v1.PairwiseMetricSpec value) { + if (pairwiseMetricSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpec_ = value; + onChanged(); + } else { + pairwiseMetricSpecBuilder_.setMessage(value); + } + metricSpecCase_ = 3; + return this; + } + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + public Builder setPairwiseMetricSpec( + com.google.cloud.aiplatform.v1.PairwiseMetricSpec.Builder builderForValue) { + if (pairwiseMetricSpecBuilder_ == null) { + metricSpec_ = builderForValue.build(); + onChanged(); + } else { + pairwiseMetricSpecBuilder_.setMessage(builderForValue.build()); + } + metricSpecCase_ = 3; + return this; + } + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + public Builder mergePairwiseMetricSpec( + com.google.cloud.aiplatform.v1.PairwiseMetricSpec value) { + if (pairwiseMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 3 + && metricSpec_ + != com.google.cloud.aiplatform.v1.PairwiseMetricSpec.getDefaultInstance()) { + metricSpec_ = + com.google.cloud.aiplatform.v1.PairwiseMetricSpec.newBuilder( + (com.google.cloud.aiplatform.v1.PairwiseMetricSpec) metricSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + metricSpec_ = value; + } + onChanged(); + } else { + if (metricSpecCase_ == 3) { + pairwiseMetricSpecBuilder_.mergeFrom(value); + } else { + pairwiseMetricSpecBuilder_.setMessage(value); + } + } + metricSpecCase_ = 3; + return this; + } + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + public Builder clearPairwiseMetricSpec() { + if (pairwiseMetricSpecBuilder_ == null) { + if (metricSpecCase_ == 3) { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + } + } else { + if (metricSpecCase_ == 3) { + metricSpecCase_ = 0; + metricSpec_ = null; + } + pairwiseMetricSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + public com.google.cloud.aiplatform.v1.PairwiseMetricSpec.Builder + getPairwiseMetricSpecBuilder() { + return internalGetPairwiseMetricSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PairwiseMetricSpecOrBuilder + getPairwiseMetricSpecOrBuilder() { + if ((metricSpecCase_ == 3) && (pairwiseMetricSpecBuilder_ != null)) { + return pairwiseMetricSpecBuilder_.getMessageOrBuilder(); + } else { + if (metricSpecCase_ == 3) { + return (com.google.cloud.aiplatform.v1.PairwiseMetricSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.PairwiseMetricSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for pairwise metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PairwiseMetricSpec, + com.google.cloud.aiplatform.v1.PairwiseMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PairwiseMetricSpecOrBuilder> + internalGetPairwiseMetricSpecFieldBuilder() { + if (pairwiseMetricSpecBuilder_ == null) { + if (!(metricSpecCase_ == 3)) { + metricSpec_ = com.google.cloud.aiplatform.v1.PairwiseMetricSpec.getDefaultInstance(); + } + pairwiseMetricSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.PairwiseMetricSpec, + com.google.cloud.aiplatform.v1.PairwiseMetricSpec.Builder, + com.google.cloud.aiplatform.v1.PairwiseMetricSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.PairwiseMetricSpec) metricSpec_, + getParentForChildren(), + isClean()); + metricSpec_ = null; + } + metricSpecCase_ = 3; + onChanged(); + return pairwiseMetricSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ExactMatchSpec, + com.google.cloud.aiplatform.v1.ExactMatchSpec.Builder, + com.google.cloud.aiplatform.v1.ExactMatchSpecOrBuilder> + exactMatchSpecBuilder_; + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + * + * @return Whether the exactMatchSpec field is set. + */ + @java.lang.Override + public boolean hasExactMatchSpec() { + return metricSpecCase_ == 4; + } + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + * + * @return The exactMatchSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExactMatchSpec getExactMatchSpec() { + if (exactMatchSpecBuilder_ == null) { + if (metricSpecCase_ == 4) { + return (com.google.cloud.aiplatform.v1.ExactMatchSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.ExactMatchSpec.getDefaultInstance(); + } else { + if (metricSpecCase_ == 4) { + return exactMatchSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.ExactMatchSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + public Builder setExactMatchSpec(com.google.cloud.aiplatform.v1.ExactMatchSpec value) { + if (exactMatchSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpec_ = value; + onChanged(); + } else { + exactMatchSpecBuilder_.setMessage(value); + } + metricSpecCase_ = 4; + return this; + } + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + public Builder setExactMatchSpec( + com.google.cloud.aiplatform.v1.ExactMatchSpec.Builder builderForValue) { + if (exactMatchSpecBuilder_ == null) { + metricSpec_ = builderForValue.build(); + onChanged(); + } else { + exactMatchSpecBuilder_.setMessage(builderForValue.build()); + } + metricSpecCase_ = 4; + return this; + } + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + public Builder mergeExactMatchSpec(com.google.cloud.aiplatform.v1.ExactMatchSpec value) { + if (exactMatchSpecBuilder_ == null) { + if (metricSpecCase_ == 4 + && metricSpec_ != com.google.cloud.aiplatform.v1.ExactMatchSpec.getDefaultInstance()) { + metricSpec_ = + com.google.cloud.aiplatform.v1.ExactMatchSpec.newBuilder( + (com.google.cloud.aiplatform.v1.ExactMatchSpec) metricSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + metricSpec_ = value; + } + onChanged(); + } else { + if (metricSpecCase_ == 4) { + exactMatchSpecBuilder_.mergeFrom(value); + } else { + exactMatchSpecBuilder_.setMessage(value); + } + } + metricSpecCase_ = 4; + return this; + } + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + public Builder clearExactMatchSpec() { + if (exactMatchSpecBuilder_ == null) { + if (metricSpecCase_ == 4) { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + } + } else { + if (metricSpecCase_ == 4) { + metricSpecCase_ = 0; + metricSpec_ = null; + } + exactMatchSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + public com.google.cloud.aiplatform.v1.ExactMatchSpec.Builder getExactMatchSpecBuilder() { + return internalGetExactMatchSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExactMatchSpecOrBuilder getExactMatchSpecOrBuilder() { + if ((metricSpecCase_ == 4) && (exactMatchSpecBuilder_ != null)) { + return exactMatchSpecBuilder_.getMessageOrBuilder(); + } else { + if (metricSpecCase_ == 4) { + return (com.google.cloud.aiplatform.v1.ExactMatchSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.ExactMatchSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for exact match metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ExactMatchSpec, + com.google.cloud.aiplatform.v1.ExactMatchSpec.Builder, + com.google.cloud.aiplatform.v1.ExactMatchSpecOrBuilder> + internalGetExactMatchSpecFieldBuilder() { + if (exactMatchSpecBuilder_ == null) { + if (!(metricSpecCase_ == 4)) { + metricSpec_ = com.google.cloud.aiplatform.v1.ExactMatchSpec.getDefaultInstance(); + } + exactMatchSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ExactMatchSpec, + com.google.cloud.aiplatform.v1.ExactMatchSpec.Builder, + com.google.cloud.aiplatform.v1.ExactMatchSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.ExactMatchSpec) metricSpec_, + getParentForChildren(), + isClean()); + metricSpec_ = null; + } + metricSpecCase_ = 4; + onChanged(); + return exactMatchSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BleuSpec, + com.google.cloud.aiplatform.v1.BleuSpec.Builder, + com.google.cloud.aiplatform.v1.BleuSpecOrBuilder> + bleuSpecBuilder_; + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + * + * @return Whether the bleuSpec field is set. + */ + @java.lang.Override + public boolean hasBleuSpec() { + return metricSpecCase_ == 5; + } + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + * + * @return The bleuSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BleuSpec getBleuSpec() { + if (bleuSpecBuilder_ == null) { + if (metricSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.BleuSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.BleuSpec.getDefaultInstance(); + } else { + if (metricSpecCase_ == 5) { + return bleuSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.BleuSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + public Builder setBleuSpec(com.google.cloud.aiplatform.v1.BleuSpec value) { + if (bleuSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpec_ = value; + onChanged(); + } else { + bleuSpecBuilder_.setMessage(value); + } + metricSpecCase_ = 5; + return this; + } + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + public Builder setBleuSpec(com.google.cloud.aiplatform.v1.BleuSpec.Builder builderForValue) { + if (bleuSpecBuilder_ == null) { + metricSpec_ = builderForValue.build(); + onChanged(); + } else { + bleuSpecBuilder_.setMessage(builderForValue.build()); + } + metricSpecCase_ = 5; + return this; + } + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + public Builder mergeBleuSpec(com.google.cloud.aiplatform.v1.BleuSpec value) { + if (bleuSpecBuilder_ == null) { + if (metricSpecCase_ == 5 + && metricSpec_ != com.google.cloud.aiplatform.v1.BleuSpec.getDefaultInstance()) { + metricSpec_ = + com.google.cloud.aiplatform.v1.BleuSpec.newBuilder( + (com.google.cloud.aiplatform.v1.BleuSpec) metricSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + metricSpec_ = value; + } + onChanged(); + } else { + if (metricSpecCase_ == 5) { + bleuSpecBuilder_.mergeFrom(value); + } else { + bleuSpecBuilder_.setMessage(value); + } + } + metricSpecCase_ = 5; + return this; + } + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + public Builder clearBleuSpec() { + if (bleuSpecBuilder_ == null) { + if (metricSpecCase_ == 5) { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + } + } else { + if (metricSpecCase_ == 5) { + metricSpecCase_ = 0; + metricSpec_ = null; + } + bleuSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + public com.google.cloud.aiplatform.v1.BleuSpec.Builder getBleuSpecBuilder() { + return internalGetBleuSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BleuSpecOrBuilder getBleuSpecOrBuilder() { + if ((metricSpecCase_ == 5) && (bleuSpecBuilder_ != null)) { + return bleuSpecBuilder_.getMessageOrBuilder(); + } else { + if (metricSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.BleuSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.BleuSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for bleu metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BleuSpec, + com.google.cloud.aiplatform.v1.BleuSpec.Builder, + com.google.cloud.aiplatform.v1.BleuSpecOrBuilder> + internalGetBleuSpecFieldBuilder() { + if (bleuSpecBuilder_ == null) { + if (!(metricSpecCase_ == 5)) { + metricSpec_ = com.google.cloud.aiplatform.v1.BleuSpec.getDefaultInstance(); + } + bleuSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.BleuSpec, + com.google.cloud.aiplatform.v1.BleuSpec.Builder, + com.google.cloud.aiplatform.v1.BleuSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.BleuSpec) metricSpec_, + getParentForChildren(), + isClean()); + metricSpec_ = null; + } + metricSpecCase_ = 5; + onChanged(); + return bleuSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RougeSpec, + com.google.cloud.aiplatform.v1.RougeSpec.Builder, + com.google.cloud.aiplatform.v1.RougeSpecOrBuilder> + rougeSpecBuilder_; + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + * + * @return Whether the rougeSpec field is set. + */ + @java.lang.Override + public boolean hasRougeSpec() { + return metricSpecCase_ == 6; + } + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + * + * @return The rougeSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RougeSpec getRougeSpec() { + if (rougeSpecBuilder_ == null) { + if (metricSpecCase_ == 6) { + return (com.google.cloud.aiplatform.v1.RougeSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.RougeSpec.getDefaultInstance(); + } else { + if (metricSpecCase_ == 6) { + return rougeSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.RougeSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + public Builder setRougeSpec(com.google.cloud.aiplatform.v1.RougeSpec value) { + if (rougeSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpec_ = value; + onChanged(); + } else { + rougeSpecBuilder_.setMessage(value); + } + metricSpecCase_ = 6; + return this; + } + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + public Builder setRougeSpec(com.google.cloud.aiplatform.v1.RougeSpec.Builder builderForValue) { + if (rougeSpecBuilder_ == null) { + metricSpec_ = builderForValue.build(); + onChanged(); + } else { + rougeSpecBuilder_.setMessage(builderForValue.build()); + } + metricSpecCase_ = 6; + return this; + } + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + public Builder mergeRougeSpec(com.google.cloud.aiplatform.v1.RougeSpec value) { + if (rougeSpecBuilder_ == null) { + if (metricSpecCase_ == 6 + && metricSpec_ != com.google.cloud.aiplatform.v1.RougeSpec.getDefaultInstance()) { + metricSpec_ = + com.google.cloud.aiplatform.v1.RougeSpec.newBuilder( + (com.google.cloud.aiplatform.v1.RougeSpec) metricSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + metricSpec_ = value; + } + onChanged(); + } else { + if (metricSpecCase_ == 6) { + rougeSpecBuilder_.mergeFrom(value); + } else { + rougeSpecBuilder_.setMessage(value); + } + } + metricSpecCase_ = 6; + return this; + } + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + public Builder clearRougeSpec() { + if (rougeSpecBuilder_ == null) { + if (metricSpecCase_ == 6) { + metricSpecCase_ = 0; + metricSpec_ = null; + onChanged(); + } + } else { + if (metricSpecCase_ == 6) { + metricSpecCase_ = 0; + metricSpec_ = null; + } + rougeSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + public com.google.cloud.aiplatform.v1.RougeSpec.Builder getRougeSpecBuilder() { + return internalGetRougeSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RougeSpecOrBuilder getRougeSpecOrBuilder() { + if ((metricSpecCase_ == 6) && (rougeSpecBuilder_ != null)) { + return rougeSpecBuilder_.getMessageOrBuilder(); + } else { + if (metricSpecCase_ == 6) { + return (com.google.cloud.aiplatform.v1.RougeSpec) metricSpec_; + } + return com.google.cloud.aiplatform.v1.RougeSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Spec for rouge metric.
+     * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RougeSpec, + com.google.cloud.aiplatform.v1.RougeSpec.Builder, + com.google.cloud.aiplatform.v1.RougeSpecOrBuilder> + internalGetRougeSpecFieldBuilder() { + if (rougeSpecBuilder_ == null) { + if (!(metricSpecCase_ == 6)) { + metricSpec_ = com.google.cloud.aiplatform.v1.RougeSpec.getDefaultInstance(); + } + rougeSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.RougeSpec, + com.google.cloud.aiplatform.v1.RougeSpec.Builder, + com.google.cloud.aiplatform.v1.RougeSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.RougeSpec) metricSpec_, + getParentForChildren(), + isClean()); + metricSpec_ = null; + } + metricSpecCase_ = 6; + onChanged(); + return rougeSpecBuilder_; + } + + private com.google.protobuf.Internal.IntList aggregationMetrics_ = emptyIntList(); + + private void ensureAggregationMetricsIsMutable() { + if (!aggregationMetrics_.isModifiable()) { + aggregationMetrics_ = makeMutableCopy(aggregationMetrics_); + } + bitField0_ |= 0x00000100; + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the aggregationMetrics. + */ + public java.util.List + getAggregationMetricsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.aiplatform.v1.Metric.AggregationMetric>( + aggregationMetrics_, aggregationMetrics_converter_); + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of aggregationMetrics. + */ + public int getAggregationMetricsCount() { + return aggregationMetrics_.size(); + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The aggregationMetrics at the given index. + */ + public com.google.cloud.aiplatform.v1.Metric.AggregationMetric getAggregationMetrics( + int index) { + return aggregationMetrics_converter_.convert(aggregationMetrics_.getInt(index)); + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The aggregationMetrics to set. + * @return This builder for chaining. + */ + public Builder setAggregationMetrics( + int index, com.google.cloud.aiplatform.v1.Metric.AggregationMetric value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregationMetricsIsMutable(); + aggregationMetrics_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The aggregationMetrics to add. + * @return This builder for chaining. + */ + public Builder addAggregationMetrics( + com.google.cloud.aiplatform.v1.Metric.AggregationMetric value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregationMetricsIsMutable(); + aggregationMetrics_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The aggregationMetrics to add. + * @return This builder for chaining. + */ + public Builder addAllAggregationMetrics( + java.lang.Iterable + values) { + ensureAggregationMetricsIsMutable(); + for (com.google.cloud.aiplatform.v1.Metric.AggregationMetric value : values) { + aggregationMetrics_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAggregationMetrics() { + aggregationMetrics_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for aggregationMetrics. + */ + public java.util.List getAggregationMetricsValueList() { + aggregationMetrics_.makeImmutable(); + return aggregationMetrics_; + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of aggregationMetrics at the given index. + */ + public int getAggregationMetricsValue(int index) { + return aggregationMetrics_.getInt(index); + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for aggregationMetrics to set. + * @return This builder for chaining. + */ + public Builder setAggregationMetricsValue(int index, int value) { + ensureAggregationMetricsIsMutable(); + aggregationMetrics_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for aggregationMetrics to add. + * @return This builder for chaining. + */ + public Builder addAggregationMetricsValue(int value) { + ensureAggregationMetricsIsMutable(); + aggregationMetrics_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The aggregation metrics to use.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for aggregationMetrics to add. + * @return This builder for chaining. + */ + public Builder addAllAggregationMetricsValue(java.lang.Iterable values) { + ensureAggregationMetricsIsMutable(); + for (int value : values) { + aggregationMetrics_.addInt(value); + } + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.Metric) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Metric) + private static final com.google.cloud.aiplatform.v1.Metric DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Metric(); + } + + public static com.google.cloud.aiplatform.v1.Metric getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.Metric getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricOrBuilder.java new file mode 100644 index 000000000000..1bb50e2df9dc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricOrBuilder.java @@ -0,0 +1,408 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface MetricOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Metric) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spec for a pre-defined metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + * + * @return Whether the predefinedMetricSpec field is set. + */ + boolean hasPredefinedMetricSpec(); + + /** + * + * + *
+   * The spec for a pre-defined metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + * + * @return The predefinedMetricSpec. + */ + com.google.cloud.aiplatform.v1.PredefinedMetricSpec getPredefinedMetricSpec(); + + /** + * + * + *
+   * The spec for a pre-defined metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedMetricSpec predefined_metric_spec = 8; + */ + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder getPredefinedMetricSpecOrBuilder(); + + /** + * + * + *
+   * Spec for a computation based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + * + * @return Whether the computationBasedMetricSpec field is set. + */ + boolean hasComputationBasedMetricSpec(); + + /** + * + * + *
+   * Spec for a computation based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + * + * @return The computationBasedMetricSpec. + */ + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpec getComputationBasedMetricSpec(); + + /** + * + * + *
+   * Spec for a computation based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ComputationBasedMetricSpec computation_based_metric_spec = 9; + * + */ + com.google.cloud.aiplatform.v1.ComputationBasedMetricSpecOrBuilder + getComputationBasedMetricSpecOrBuilder(); + + /** + * + * + *
+   * Spec for an LLM based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + * + * @return Whether the llmBasedMetricSpec field is set. + */ + boolean hasLlmBasedMetricSpec(); + + /** + * + * + *
+   * Spec for an LLM based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + * + * @return The llmBasedMetricSpec. + */ + com.google.cloud.aiplatform.v1.LLMBasedMetricSpec getLlmBasedMetricSpec(); + + /** + * + * + *
+   * Spec for an LLM based metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.LLMBasedMetricSpec llm_based_metric_spec = 10; + */ + com.google.cloud.aiplatform.v1.LLMBasedMetricSpecOrBuilder getLlmBasedMetricSpecOrBuilder(); + + /** + * + * + *
+   * Spec for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + * + * @return Whether the pointwiseMetricSpec field is set. + */ + boolean hasPointwiseMetricSpec(); + + /** + * + * + *
+   * Spec for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + * + * @return The pointwiseMetricSpec. + */ + com.google.cloud.aiplatform.v1.PointwiseMetricSpec getPointwiseMetricSpec(); + + /** + * + * + *
+   * Spec for pointwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PointwiseMetricSpec pointwise_metric_spec = 2; + */ + com.google.cloud.aiplatform.v1.PointwiseMetricSpecOrBuilder getPointwiseMetricSpecOrBuilder(); + + /** + * + * + *
+   * Spec for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + * + * @return Whether the pairwiseMetricSpec field is set. + */ + boolean hasPairwiseMetricSpec(); + + /** + * + * + *
+   * Spec for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + * + * @return The pairwiseMetricSpec. + */ + com.google.cloud.aiplatform.v1.PairwiseMetricSpec getPairwiseMetricSpec(); + + /** + * + * + *
+   * Spec for pairwise metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.PairwiseMetricSpec pairwise_metric_spec = 3; + */ + com.google.cloud.aiplatform.v1.PairwiseMetricSpecOrBuilder getPairwiseMetricSpecOrBuilder(); + + /** + * + * + *
+   * Spec for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + * + * @return Whether the exactMatchSpec field is set. + */ + boolean hasExactMatchSpec(); + + /** + * + * + *
+   * Spec for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + * + * @return The exactMatchSpec. + */ + com.google.cloud.aiplatform.v1.ExactMatchSpec getExactMatchSpec(); + + /** + * + * + *
+   * Spec for exact match metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.ExactMatchSpec exact_match_spec = 4; + */ + com.google.cloud.aiplatform.v1.ExactMatchSpecOrBuilder getExactMatchSpecOrBuilder(); + + /** + * + * + *
+   * Spec for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + * + * @return Whether the bleuSpec field is set. + */ + boolean hasBleuSpec(); + + /** + * + * + *
+   * Spec for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + * + * @return The bleuSpec. + */ + com.google.cloud.aiplatform.v1.BleuSpec getBleuSpec(); + + /** + * + * + *
+   * Spec for bleu metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.BleuSpec bleu_spec = 5; + */ + com.google.cloud.aiplatform.v1.BleuSpecOrBuilder getBleuSpecOrBuilder(); + + /** + * + * + *
+   * Spec for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + * + * @return Whether the rougeSpec field is set. + */ + boolean hasRougeSpec(); + + /** + * + * + *
+   * Spec for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + * + * @return The rougeSpec. + */ + com.google.cloud.aiplatform.v1.RougeSpec getRougeSpec(); + + /** + * + * + *
+   * Spec for rouge metric.
+   * 
+ * + * .google.cloud.aiplatform.v1.RougeSpec rouge_spec = 6; + */ + com.google.cloud.aiplatform.v1.RougeSpecOrBuilder getRougeSpecOrBuilder(); + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the aggregationMetrics. + */ + java.util.List + getAggregationMetricsList(); + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of aggregationMetrics. + */ + int getAggregationMetricsCount(); + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The aggregationMetrics at the given index. + */ + com.google.cloud.aiplatform.v1.Metric.AggregationMetric getAggregationMetrics(int index); + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for aggregationMetrics. + */ + java.util.List getAggregationMetricsValueList(); + + /** + * + * + *
+   * Optional. The aggregation metrics to use.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Metric.AggregationMetric aggregation_metrics = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of aggregationMetrics at the given index. + */ + int getAggregationMetricsValue(int index); + + com.google.cloud.aiplatform.v1.Metric.MetricSpecCase getMetricSpecCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricResult.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricResult.java new file mode 100644 index 000000000000..67afce8ca513 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricResult.java @@ -0,0 +1,1064 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Result for a single metric on a single instance.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MetricResult} + */ +@com.google.protobuf.Generated +public final class MetricResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MetricResult) + MetricResultOrBuilder { + 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= */ "", + "MetricResult"); + } + + // Use MetricResult.newBuilder() to construct. + private MetricResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MetricResult() { + explanation_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_MetricResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_MetricResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MetricResult.class, + com.google.cloud.aiplatform.v1.MetricResult.Builder.class); + } + + private int bitField0_; + public static final int SCORE_FIELD_NUMBER = 1; + private float score_ = 0F; + + /** + * + * + *
+   * Output only. The score for the metric.
+   * Please refer to each metric's documentation for the meaning of the score.
+   * 
+ * + * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the score field is set. + */ + @java.lang.Override + public boolean hasScore() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The score for the metric.
+   * Please refer to each metric's documentation for the meaning of the score.
+   * 
+ * + * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int EXPLANATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object explanation_ = ""; + + /** + * + * + *
+   * Output only. The explanation for the metric result.
+   * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the explanation field is set. + */ + @java.lang.Override + public boolean hasExplanation() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The explanation for the metric result.
+   * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The explanation. + */ + @java.lang.Override + public java.lang.String getExplanation() { + java.lang.Object ref = explanation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + explanation_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The explanation for the metric result.
+   * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for explanation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExplanationBytes() { + java.lang.Object ref = explanation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + explanation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status error_; + + /** + * + * + *
+   * Output only. The error status for the metric result.
+   * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The error status for the metric result.
+   * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + /** + * + * + *
+   * Output only. The error status for the metric result.
+   * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + 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.writeFloat(1, score_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, explanation_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getError()); + } + 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.computeFloatSize(1, score_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, explanation_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getError()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.MetricResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MetricResult other = + (com.google.cloud.aiplatform.v1.MetricResult) obj; + + if (hasScore() != other.hasScore()) return false; + if (hasScore()) { + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + } + if (hasExplanation() != other.hasExplanation()) return false; + if (hasExplanation()) { + if (!getExplanation().equals(other.getExplanation())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) 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 (hasScore()) { + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); + } + if (hasExplanation()) { + hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; + hash = (53 * hash) + getExplanation().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MetricResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.MetricResult 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 for a single metric on a single instance.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MetricResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MetricResult) + com.google.cloud.aiplatform.v1.MetricResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_MetricResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_MetricResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MetricResult.class, + com.google.cloud.aiplatform.v1.MetricResult.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.MetricResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetErrorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + score_ = 0F; + explanation_ = ""; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_MetricResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MetricResult getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MetricResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MetricResult build() { + com.google.cloud.aiplatform.v1.MetricResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MetricResult buildPartial() { + com.google.cloud.aiplatform.v1.MetricResult result = + new com.google.cloud.aiplatform.v1.MetricResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.MetricResult result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.score_ = score_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.explanation_ = explanation_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.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.aiplatform.v1.MetricResult) { + return mergeFrom((com.google.cloud.aiplatform.v1.MetricResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.MetricResult other) { + if (other == com.google.cloud.aiplatform.v1.MetricResult.getDefaultInstance()) return this; + if (other.hasScore()) { + setScore(other.getScore()); + } + if (other.hasExplanation()) { + explanation_ = other.explanation_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasError()) { + mergeError(other.getError()); + } + 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: + { + score_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 26: + { + explanation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetErrorFieldBuilder().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 float score_; + + /** + * + * + *
+     * Output only. The score for the metric.
+     * Please refer to each metric's documentation for the meaning of the score.
+     * 
+ * + * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the score field is set. + */ + @java.lang.Override + public boolean hasScore() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The score for the metric.
+     * Please refer to each metric's documentation for the meaning of the score.
+     * 
+ * + * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + /** + * + * + *
+     * Output only. The score for the metric.
+     * Please refer to each metric's documentation for the meaning of the score.
+     * 
+ * + * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The score for the metric.
+     * Please refer to each metric's documentation for the meaning of the score.
+     * 
+ * + * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000001); + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object explanation_ = ""; + + /** + * + * + *
+     * Output only. The explanation for the metric result.
+     * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the explanation field is set. + */ + public boolean hasExplanation() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The explanation for the metric result.
+     * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The explanation. + */ + public java.lang.String getExplanation() { + java.lang.Object ref = explanation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + explanation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The explanation for the metric result.
+     * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for explanation. + */ + public com.google.protobuf.ByteString getExplanationBytes() { + java.lang.Object ref = explanation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + explanation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The explanation for the metric result.
+     * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The explanation to set. + * @return This builder for chaining. + */ + public Builder setExplanation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + explanation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The explanation for the metric result.
+     * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearExplanation() { + explanation_ = getDefaultInstance().getExplanation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The explanation for the metric result.
+     * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for explanation to set. + * @return This builder for chaining. + */ + public Builder setExplanationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + explanation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + if (error_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000004); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + + /** + * + * + *
+     * Output only. The error status for the metric result.
+     * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.MetricResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MetricResult) + private static final com.google.cloud.aiplatform.v1.MetricResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.MetricResult(); + } + + public static com.google.cloud.aiplatform.v1.MetricResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.MetricResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricResultOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricResultOrBuilder.java new file mode 100644 index 000000000000..2b49c42828a9 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MetricResultOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface MetricResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MetricResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The score for the metric.
+   * Please refer to each metric's documentation for the meaning of the score.
+   * 
+ * + * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the score field is set. + */ + boolean hasScore(); + + /** + * + * + *
+   * Output only. The score for the metric.
+   * Please refer to each metric's documentation for the meaning of the score.
+   * 
+ * + * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The score. + */ + float getScore(); + + /** + * + * + *
+   * Output only. The explanation for the metric result.
+   * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the explanation field is set. + */ + boolean hasExplanation(); + + /** + * + * + *
+   * Output only. The explanation for the metric result.
+   * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The explanation. + */ + java.lang.String getExplanation(); + + /** + * + * + *
+   * Output only. The explanation for the metric result.
+   * 
+ * + * optional string explanation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for explanation. + */ + com.google.protobuf.ByteString getExplanationBytes(); + + /** + * + * + *
+   * Output only. The error status for the metric result.
+   * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * + * + *
+   * Output only. The error status for the metric result.
+   * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The error. + */ + com.google.rpc.Status getError(); + + /** + * + * + *
+   * Output only. The error status for the metric result.
+   * 
+ * + * optional .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputConfig.java new file mode 100644 index 000000000000..e22389994ef4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputConfig.java @@ -0,0 +1,794 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Config for evaluation output.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.OutputConfig} + */ +@com.google.protobuf.Generated +public final class OutputConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.OutputConfig) + OutputConfigOrBuilder { + 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= */ "", + "OutputConfig"); + } + + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OutputConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.OutputConfig.class, + com.google.cloud.aiplatform.v1.OutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(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 DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Cloud storage destination for evaluation output.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + + /** + * + * + *
+   * Cloud storage destination for evaluation output.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + + /** + * + * + *
+   * Cloud storage destination for evaluation output.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.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 (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.OutputConfig other = + (com.google.cloud.aiplatform.v1.OutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination().equals(other.getGcsDestination())) 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 (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.OutputConfig 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 evaluation output.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.OutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.OutputConfig) + com.google.cloud.aiplatform.v1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.OutputConfig.class, + com.google.cloud.aiplatform.v1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.OutputConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gcsDestinationBuilder_ != null) { + gcsDestinationBuilder_.clear(); + } + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputConfig build() { + com.google.cloud.aiplatform.v1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputConfig buildPartial() { + com.google.cloud.aiplatform.v1.OutputConfig result = + new com.google.cloud.aiplatform.v1.OutputConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.OutputConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.OutputConfig result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + if (destinationCase_ == 1 && gcsDestinationBuilder_ != null) { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.OutputConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.OutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.OutputConfig other) { + if (other == com.google.cloud.aiplatform.v1.OutputConfig.getDefaultInstance()) return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case DESTINATION_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( + internalGetGcsDestinationFieldBuilder().getBuilder(), extensionRegistry); + destinationCase_ = 1; + 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 destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.aiplatform.v1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 + && destination_ != com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.aiplatform.v1.GcsDestination.newBuilder( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } else { + gcsDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 1; + return this; + } + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.aiplatform.v1.GcsDestination.Builder getGcsDestinationBuilder() { + return internalGetGcsDestinationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Cloud storage destination for evaluation output.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + internalGetGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder>( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged(); + return gcsDestinationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.OutputConfig) + private static final com.google.cloud.aiplatform.v1.OutputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.OutputConfig(); + } + + public static com.google.cloud.aiplatform.v1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..745abb24d380 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputConfigOrBuilder.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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface OutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud storage destination for evaluation output.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + + /** + * + * + *
+   * Cloud storage destination for evaluation output.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return The gcsDestination. + */ + com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination(); + + /** + * + * + *
+   * Cloud storage destination for evaluation output.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + com.google.cloud.aiplatform.v1.OutputConfig.DestinationCase getDestinationCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputInfo.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputInfo.java new file mode 100644 index 000000000000..659798f6c4c3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputInfo.java @@ -0,0 +1,737 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Describes the info for output of EvaluationService.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.OutputInfo} + */ +@com.google.protobuf.Generated +public final class OutputInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.OutputInfo) + OutputInfoOrBuilder { + 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= */ "", + "OutputInfo"); + } + + // Use OutputInfo.newBuilder() to construct. + private OutputInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OutputInfo() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.OutputInfo.class, + com.google.cloud.aiplatform.v1.OutputInfo.Builder.class); + } + + private int outputLocationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object outputLocation_; + + public enum OutputLocationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_OUTPUT_DIRECTORY(1), + OUTPUTLOCATION_NOT_SET(0); + private final int value; + + private OutputLocationCase(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 OutputLocationCase valueOf(int value) { + return forNumber(value); + } + + public static OutputLocationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_OUTPUT_DIRECTORY; + case 0: + return OUTPUTLOCATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OutputLocationCase getOutputLocationCase() { + return OutputLocationCase.forNumber(outputLocationCase_); + } + + public static final int GCS_OUTPUT_DIRECTORY_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Output only. The full path of the Cloud Storage directory created, into
+   * which the evaluation results and aggregation results are written.
+   * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the gcsOutputDirectory field is set. + */ + public boolean hasGcsOutputDirectory() { + return outputLocationCase_ == 1; + } + + /** + * + * + *
+   * Output only. The full path of the Cloud Storage directory created, into
+   * which the evaluation results and aggregation results are written.
+   * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsOutputDirectory. + */ + public java.lang.String getGcsOutputDirectory() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 1) { + ref = outputLocation_; + } + if (ref instanceof java.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 (outputLocationCase_ == 1) { + outputLocation_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Output only. The full path of the Cloud Storage directory created, into
+   * which the evaluation results and aggregation results are written.
+   * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsOutputDirectory. + */ + public com.google.protobuf.ByteString getGcsOutputDirectoryBytes() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 1) { + ref = outputLocation_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (outputLocationCase_ == 1) { + outputLocation_ = 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 (outputLocationCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, outputLocation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputLocationCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, outputLocation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.OutputInfo)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.OutputInfo other = + (com.google.cloud.aiplatform.v1.OutputInfo) obj; + + if (!getOutputLocationCase().equals(other.getOutputLocationCase())) return false; + switch (outputLocationCase_) { + case 1: + if (!getGcsOutputDirectory().equals(other.getGcsOutputDirectory())) 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 (outputLocationCase_) { + case 1: + hash = (37 * hash) + GCS_OUTPUT_DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getGcsOutputDirectory().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.OutputInfo 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; + } + + /** + * + * + *
+   * Describes the info for output of EvaluationService.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.OutputInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.OutputInfo) + com.google.cloud.aiplatform.v1.OutputInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.OutputInfo.class, + com.google.cloud.aiplatform.v1.OutputInfo.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.OutputInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + outputLocationCase_ = 0; + outputLocation_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_OutputInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputInfo getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.OutputInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputInfo build() { + com.google.cloud.aiplatform.v1.OutputInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.OutputInfo buildPartial() { + com.google.cloud.aiplatform.v1.OutputInfo result = + new com.google.cloud.aiplatform.v1.OutputInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.OutputInfo result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.OutputInfo result) { + result.outputLocationCase_ = outputLocationCase_; + result.outputLocation_ = this.outputLocation_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.OutputInfo) { + return mergeFrom((com.google.cloud.aiplatform.v1.OutputInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.OutputInfo other) { + if (other == com.google.cloud.aiplatform.v1.OutputInfo.getDefaultInstance()) return this; + switch (other.getOutputLocationCase()) { + case GCS_OUTPUT_DIRECTORY: + { + outputLocationCase_ = 1; + outputLocation_ = other.outputLocation_; + onChanged(); + break; + } + case OUTPUTLOCATION_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(); + outputLocationCase_ = 1; + outputLocation_ = 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 outputLocationCase_ = 0; + private java.lang.Object outputLocation_; + + public OutputLocationCase getOutputLocationCase() { + return OutputLocationCase.forNumber(outputLocationCase_); + } + + public Builder clearOutputLocation() { + outputLocationCase_ = 0; + outputLocation_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into
+     * which the evaluation results and aggregation results are written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the gcsOutputDirectory field is set. + */ + @java.lang.Override + public boolean hasGcsOutputDirectory() { + return outputLocationCase_ == 1; + } + + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into
+     * which the evaluation results and aggregation results are written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsOutputDirectory. + */ + @java.lang.Override + public java.lang.String getGcsOutputDirectory() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 1) { + ref = outputLocation_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (outputLocationCase_ == 1) { + outputLocation_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into
+     * which the evaluation results and aggregation results are written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsOutputDirectory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsOutputDirectoryBytes() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 1) { + ref = outputLocation_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (outputLocationCase_ == 1) { + outputLocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into
+     * which the evaluation results and aggregation results are written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The gcsOutputDirectory to set. + * @return This builder for chaining. + */ + public Builder setGcsOutputDirectory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputLocationCase_ = 1; + outputLocation_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into
+     * which the evaluation results and aggregation results are written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGcsOutputDirectory() { + if (outputLocationCase_ == 1) { + outputLocationCase_ = 0; + outputLocation_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into
+     * which the evaluation results and aggregation results are written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for gcsOutputDirectory to set. + * @return This builder for chaining. + */ + public Builder setGcsOutputDirectoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputLocationCase_ = 1; + outputLocation_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.OutputInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.OutputInfo) + private static final com.google.cloud.aiplatform.v1.OutputInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.OutputInfo(); + } + + public static com.google.cloud.aiplatform.v1.OutputInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.OutputInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputInfoOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputInfoOrBuilder.java new file mode 100644 index 000000000000..902b31c10ad9 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OutputInfoOrBuilder.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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface OutputInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.OutputInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The full path of the Cloud Storage directory created, into
+   * which the evaluation results and aggregation results are written.
+   * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the gcsOutputDirectory field is set. + */ + boolean hasGcsOutputDirectory(); + + /** + * + * + *
+   * Output only. The full path of the Cloud Storage directory created, into
+   * which the evaluation results and aggregation results are written.
+   * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsOutputDirectory. + */ + java.lang.String getGcsOutputDirectory(); + + /** + * + * + *
+   * Output only. The full path of the Cloud Storage directory created, into
+   * which the evaluation results and aggregation results are written.
+   * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsOutputDirectory. + */ + com.google.protobuf.ByteString getGcsOutputDirectoryBytes(); + + com.google.cloud.aiplatform.v1.OutputInfo.OutputLocationCase getOutputLocationCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricInstance.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricInstance.java index b3840435c904..2b74e8499351 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricInstance.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricInstance.java @@ -79,6 +79,7 @@ public enum InstanceCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { JSON_INSTANCE(1), + CONTENT_MAP_INSTANCE(2), INSTANCE_NOT_SET(0); private final int value; @@ -100,6 +101,8 @@ public static InstanceCase forNumber(int value) { switch (value) { case 1: return JSON_INSTANCE; + case 2: + return CONTENT_MAP_INSTANCE; case 0: return INSTANCE_NOT_SET; default: @@ -195,6 +198,66 @@ public com.google.protobuf.ByteString getJsonInstanceBytes() { } } + public static final int CONTENT_MAP_INSTANCE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return Whether the contentMapInstance field is set. + */ + @java.lang.Override + public boolean hasContentMapInstance() { + return instanceCase_ == 2; + } + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return The contentMapInstance. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap getContentMapInstance() { + if (instanceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.ContentMap) instance_; + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMapOrBuilder getContentMapInstanceOrBuilder() { + if (instanceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.ContentMap) instance_; + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -212,6 +275,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceCase_ == 1) { com.google.protobuf.GeneratedMessage.writeString(output, 1, instance_); } + if (instanceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1.ContentMap) instance_); + } getUnknownFields().writeTo(output); } @@ -224,6 +290,11 @@ public int getSerializedSize() { if (instanceCase_ == 1) { size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instance_); } + if (instanceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.ContentMap) instance_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -245,6 +316,9 @@ public boolean equals(final java.lang.Object obj) { case 1: if (!getJsonInstance().equals(other.getJsonInstance())) return false; break; + case 2: + if (!getContentMapInstance().equals(other.getContentMapInstance())) return false; + break; case 0: default: } @@ -264,6 +338,10 @@ public int hashCode() { hash = (37 * hash) + JSON_INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getJsonInstance().hashCode(); break; + case 2: + hash = (37 * hash) + CONTENT_MAP_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getContentMapInstance().hashCode(); + break; case 0: default: } @@ -409,6 +487,9 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; + if (contentMapInstanceBuilder_ != null) { + contentMapInstanceBuilder_.clear(); + } instanceCase_ = 0; instance_ = null; return this; @@ -453,6 +534,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.PairwiseMetricInstance private void buildPartialOneofs(com.google.cloud.aiplatform.v1.PairwiseMetricInstance result) { result.instanceCase_ = instanceCase_; result.instance_ = this.instance_; + if (instanceCase_ == 2 && contentMapInstanceBuilder_ != null) { + result.instance_ = contentMapInstanceBuilder_.build(); + } } @java.lang.Override @@ -476,6 +560,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.PairwiseMetricInstance o onChanged(); break; } + case CONTENT_MAP_INSTANCE: + { + mergeContentMapInstance(other.getContentMapInstance()); + break; + } case INSTANCE_NOT_SET: { break; @@ -514,6 +603,13 @@ public Builder mergeFrom( instance_ = s; break; } // case 10 + case 18: + { + input.readMessage( + internalGetContentMapInstanceFieldBuilder().getBuilder(), extensionRegistry); + instanceCase_ = 2; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -698,6 +794,242 @@ public Builder setJsonInstanceBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ContentMap, + com.google.cloud.aiplatform.v1.ContentMap.Builder, + com.google.cloud.aiplatform.v1.ContentMapOrBuilder> + contentMapInstanceBuilder_; + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return Whether the contentMapInstance field is set. + */ + @java.lang.Override + public boolean hasContentMapInstance() { + return instanceCase_ == 2; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return The contentMapInstance. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap getContentMapInstance() { + if (contentMapInstanceBuilder_ == null) { + if (instanceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.ContentMap) instance_; + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } else { + if (instanceCase_ == 2) { + return contentMapInstanceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public Builder setContentMapInstance(com.google.cloud.aiplatform.v1.ContentMap value) { + if (contentMapInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + contentMapInstanceBuilder_.setMessage(value); + } + instanceCase_ = 2; + return this; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public Builder setContentMapInstance( + com.google.cloud.aiplatform.v1.ContentMap.Builder builderForValue) { + if (contentMapInstanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + contentMapInstanceBuilder_.setMessage(builderForValue.build()); + } + instanceCase_ = 2; + return this; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public Builder mergeContentMapInstance(com.google.cloud.aiplatform.v1.ContentMap value) { + if (contentMapInstanceBuilder_ == null) { + if (instanceCase_ == 2 + && instance_ != com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance()) { + instance_ = + com.google.cloud.aiplatform.v1.ContentMap.newBuilder( + (com.google.cloud.aiplatform.v1.ContentMap) instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + if (instanceCase_ == 2) { + contentMapInstanceBuilder_.mergeFrom(value); + } else { + contentMapInstanceBuilder_.setMessage(value); + } + } + instanceCase_ = 2; + return this; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public Builder clearContentMapInstance() { + if (contentMapInstanceBuilder_ == null) { + if (instanceCase_ == 2) { + instanceCase_ = 0; + instance_ = null; + onChanged(); + } + } else { + if (instanceCase_ == 2) { + instanceCase_ = 0; + instance_ = null; + } + contentMapInstanceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public com.google.cloud.aiplatform.v1.ContentMap.Builder getContentMapInstanceBuilder() { + return internalGetContentMapInstanceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMapOrBuilder getContentMapInstanceOrBuilder() { + if ((instanceCase_ == 2) && (contentMapInstanceBuilder_ != null)) { + return contentMapInstanceBuilder_.getMessageOrBuilder(); + } else { + if (instanceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.ContentMap) instance_; + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ContentMap, + com.google.cloud.aiplatform.v1.ContentMap.Builder, + com.google.cloud.aiplatform.v1.ContentMapOrBuilder> + internalGetContentMapInstanceFieldBuilder() { + if (contentMapInstanceBuilder_ == null) { + if (!(instanceCase_ == 2)) { + instance_ = com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + contentMapInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ContentMap, + com.google.cloud.aiplatform.v1.ContentMap.Builder, + com.google.cloud.aiplatform.v1.ContentMapOrBuilder>( + (com.google.cloud.aiplatform.v1.ContentMap) instance_, + getParentForChildren(), + isClean()); + instance_ = null; + } + instanceCase_ = 2; + onChanged(); + return contentMapInstanceBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PairwiseMetricInstance) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricInstanceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricInstanceOrBuilder.java index d40e2cd906b0..8e17b3f5a6dc 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricInstanceOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricInstanceOrBuilder.java @@ -71,5 +71,48 @@ public interface PairwiseMetricInstanceOrBuilder */ com.google.protobuf.ByteString getJsonInstanceBytes(); + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return Whether the contentMapInstance field is set. + */ + boolean hasContentMapInstance(); + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return The contentMapInstance. + */ + com.google.cloud.aiplatform.v1.ContentMap getContentMapInstance(); + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + com.google.cloud.aiplatform.v1.ContentMapOrBuilder getContentMapInstanceOrBuilder(); + com.google.cloud.aiplatform.v1.PairwiseMetricInstance.InstanceCase getInstanceCase(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricResult.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricResult.java index a6a32b11c127..803c0003b545 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricResult.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricResult.java @@ -71,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.aiplatform.v1.PairwiseMetricResult.Builder.class); } + private int bitField0_; public static final int PAIRWISE_CHOICE_FIELD_NUMBER = 1; private int pairwiseChoice_ = 0; @@ -165,6 +166,65 @@ public com.google.protobuf.ByteString getExplanationBytes() { } } + public static final int CUSTOM_OUTPUT_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.CustomOutput customOutput_; + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the customOutput field is set. + */ + @java.lang.Override + public boolean hasCustomOutput() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The customOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutput getCustomOutput() { + return customOutput_ == null + ? com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance() + : customOutput_; + } + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputOrBuilder getCustomOutputOrBuilder() { + return customOutput_ == null + ? com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance() + : customOutput_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -186,6 +246,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explanation_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, explanation_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCustomOutput()); + } getUnknownFields().writeTo(output); } @@ -202,6 +265,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explanation_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, explanation_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCustomOutput()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -220,6 +286,10 @@ public boolean equals(final java.lang.Object obj) { if (pairwiseChoice_ != other.pairwiseChoice_) return false; if (!getExplanation().equals(other.getExplanation())) return false; + if (hasCustomOutput() != other.hasCustomOutput()) return false; + if (hasCustomOutput()) { + if (!getCustomOutput().equals(other.getCustomOutput())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -235,6 +305,10 @@ public int hashCode() { hash = (53 * hash) + pairwiseChoice_; hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; hash = (53 * hash) + getExplanation().hashCode(); + if (hasCustomOutput()) { + hash = (37 * hash) + CUSTOM_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getCustomOutput().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -365,10 +439,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.aiplatform.v1.PairwiseMetricResult.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) { + internalGetCustomOutputFieldBuilder(); + } } @java.lang.Override @@ -377,6 +460,11 @@ public Builder clear() { bitField0_ = 0; pairwiseChoice_ = 0; explanation_ = ""; + customOutput_ = null; + if (customOutputBuilder_ != null) { + customOutputBuilder_.dispose(); + customOutputBuilder_ = null; + } return this; } @@ -419,6 +507,13 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.PairwiseMetricResult r if (((from_bitField0_ & 0x00000002) != 0)) { result.explanation_ = explanation_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.customOutput_ = + customOutputBuilder_ == null ? customOutput_ : customOutputBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -442,6 +537,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.PairwiseMetricResult oth bitField0_ |= 0x00000002; onChanged(); } + if (other.hasCustomOutput()) { + mergeCustomOutput(other.getCustomOutput()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -480,6 +578,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + input.readMessage( + internalGetCustomOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -715,6 +820,219 @@ public Builder setExplanationBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.aiplatform.v1.CustomOutput customOutput_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutput, + com.google.cloud.aiplatform.v1.CustomOutput.Builder, + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder> + customOutputBuilder_; + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the customOutput field is set. + */ + public boolean hasCustomOutput() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The customOutput. + */ + public com.google.cloud.aiplatform.v1.CustomOutput getCustomOutput() { + if (customOutputBuilder_ == null) { + return customOutput_ == null + ? com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance() + : customOutput_; + } else { + return customOutputBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCustomOutput(com.google.cloud.aiplatform.v1.CustomOutput value) { + if (customOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customOutput_ = value; + } else { + customOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCustomOutput( + com.google.cloud.aiplatform.v1.CustomOutput.Builder builderForValue) { + if (customOutputBuilder_ == null) { + customOutput_ = builderForValue.build(); + } else { + customOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCustomOutput(com.google.cloud.aiplatform.v1.CustomOutput value) { + if (customOutputBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && customOutput_ != null + && customOutput_ != com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance()) { + getCustomOutputBuilder().mergeFrom(value); + } else { + customOutput_ = value; + } + } else { + customOutputBuilder_.mergeFrom(value); + } + if (customOutput_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCustomOutput() { + bitField0_ = (bitField0_ & ~0x00000004); + customOutput_ = null; + if (customOutputBuilder_ != null) { + customOutputBuilder_.dispose(); + customOutputBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.CustomOutput.Builder getCustomOutputBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCustomOutputFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.CustomOutputOrBuilder getCustomOutputOrBuilder() { + if (customOutputBuilder_ != null) { + return customOutputBuilder_.getMessageOrBuilder(); + } else { + return customOutput_ == null + ? com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance() + : customOutput_; + } + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutput, + com.google.cloud.aiplatform.v1.CustomOutput.Builder, + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder> + internalGetCustomOutputFieldBuilder() { + if (customOutputBuilder_ == null) { + customOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutput, + com.google.cloud.aiplatform.v1.CustomOutput.Builder, + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder>( + getCustomOutput(), getParentForChildren(), isClean()); + customOutput_ = null; + } + return customOutputBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PairwiseMetricResult) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricResultOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricResultOrBuilder.java index 2cfad98c0c27..9c7941aa3804 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricResultOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricResultOrBuilder.java @@ -81,4 +81,47 @@ public interface PairwiseMetricResultOrBuilder * @return The bytes for explanation. */ com.google.protobuf.ByteString getExplanationBytes(); + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the customOutput field is set. + */ + boolean hasCustomOutput(); + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The customOutput. + */ + com.google.cloud.aiplatform.v1.CustomOutput getCustomOutput(); + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder getCustomOutputOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricSpec.java index 0a59416c41f4..d431e3c736f7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricSpec.java @@ -53,6 +53,9 @@ private PairwiseMetricSpec(com.google.protobuf.GeneratedMessage.Builder build private PairwiseMetricSpec() { metricPromptTemplate_ = ""; + candidateResponseFieldName_ = ""; + baselineResponseFieldName_ = ""; + systemInstruction_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -143,6 +146,255 @@ public com.google.protobuf.ByteString getMetricPromptTemplateBytes() { } } + public static final int CANDIDATE_RESPONSE_FIELD_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object candidateResponseFieldName_ = ""; + + /** + * + * + *
+   * Optional. The field name of the candidate response.
+   * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The candidateResponseFieldName. + */ + @java.lang.Override + public java.lang.String getCandidateResponseFieldName() { + java.lang.Object ref = candidateResponseFieldName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + candidateResponseFieldName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The field name of the candidate response.
+   * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for candidateResponseFieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCandidateResponseFieldNameBytes() { + java.lang.Object ref = candidateResponseFieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + candidateResponseFieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASELINE_RESPONSE_FIELD_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object baselineResponseFieldName_ = ""; + + /** + * + * + *
+   * Optional. The field name of the baseline response.
+   * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The baselineResponseFieldName. + */ + @java.lang.Override + public java.lang.String getBaselineResponseFieldName() { + java.lang.Object ref = baselineResponseFieldName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baselineResponseFieldName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The field name of the baseline response.
+   * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for baselineResponseFieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaselineResponseFieldNameBytes() { + java.lang.Object ref = baselineResponseFieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineResponseFieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object systemInstruction_ = ""; + + /** + * + * + *
+   * Optional. System instructions for pairwise metric.
+   * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the systemInstruction field is set. + */ + @java.lang.Override + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. System instructions for pairwise metric.
+   * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + @java.lang.Override + public java.lang.String getSystemInstruction() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + systemInstruction_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. System instructions for pairwise metric.
+   * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSystemInstructionBytes() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + systemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_OUTPUT_FORMAT_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.CustomOutputFormatConfig customOutputFormatConfig_; + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * When this config is set, the default output is replaced with
+   * the raw output string.
+   * If a custom format is chosen, the `pairwise_choice` and `explanation`
+   * fields in the corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customOutputFormatConfig field is set. + */ + @java.lang.Override + public boolean hasCustomOutputFormatConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * When this config is set, the default output is replaced with
+   * the raw output string.
+   * If a custom format is chosen, the `pairwise_choice` and `explanation`
+   * fields in the corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customOutputFormatConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig getCustomOutputFormatConfig() { + return customOutputFormatConfig_ == null + ? com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance() + : customOutputFormatConfig_; + } + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * When this config is set, the default output is replaced with
+   * the raw output string.
+   * If a custom format is chosen, the `pairwise_choice` and `explanation`
+   * fields in the corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder + getCustomOutputFormatConfigOrBuilder() { + return customOutputFormatConfig_ == null + ? com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance() + : customOutputFormatConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -160,6 +412,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessage.writeString(output, 1, metricPromptTemplate_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(candidateResponseFieldName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, candidateResponseFieldName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(baselineResponseFieldName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, baselineResponseFieldName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, systemInstruction_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getCustomOutputFormatConfig()); + } getUnknownFields().writeTo(output); } @@ -172,6 +436,21 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(1, metricPromptTemplate_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(candidateResponseFieldName_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(2, candidateResponseFieldName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(baselineResponseFieldName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, baselineResponseFieldName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, systemInstruction_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getCustomOutputFormatConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -192,6 +471,17 @@ public boolean equals(final java.lang.Object obj) { if (hasMetricPromptTemplate()) { if (!getMetricPromptTemplate().equals(other.getMetricPromptTemplate())) return false; } + if (!getCandidateResponseFieldName().equals(other.getCandidateResponseFieldName())) + return false; + if (!getBaselineResponseFieldName().equals(other.getBaselineResponseFieldName())) return false; + if (hasSystemInstruction() != other.hasSystemInstruction()) return false; + if (hasSystemInstruction()) { + if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; + } + if (hasCustomOutputFormatConfig() != other.hasCustomOutputFormatConfig()) return false; + if (hasCustomOutputFormatConfig()) { + if (!getCustomOutputFormatConfig().equals(other.getCustomOutputFormatConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -207,6 +497,18 @@ public int hashCode() { hash = (37 * hash) + METRIC_PROMPT_TEMPLATE_FIELD_NUMBER; hash = (53 * hash) + getMetricPromptTemplate().hashCode(); } + hash = (37 * hash) + CANDIDATE_RESPONSE_FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCandidateResponseFieldName().hashCode(); + hash = (37 * hash) + BASELINE_RESPONSE_FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBaselineResponseFieldName().hashCode(); + if (hasSystemInstruction()) { + hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getSystemInstruction().hashCode(); + } + if (hasCustomOutputFormatConfig()) { + hash = (37 * hash) + CUSTOM_OUTPUT_FORMAT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCustomOutputFormatConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -337,10 +639,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.aiplatform.v1.PairwiseMetricSpec.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) { + internalGetCustomOutputFormatConfigFieldBuilder(); + } } @java.lang.Override @@ -348,6 +659,14 @@ public Builder clear() { super.clear(); bitField0_ = 0; metricPromptTemplate_ = ""; + candidateResponseFieldName_ = ""; + baselineResponseFieldName_ = ""; + systemInstruction_ = ""; + customOutputFormatConfig_ = null; + if (customOutputFormatConfigBuilder_ != null) { + customOutputFormatConfigBuilder_.dispose(); + customOutputFormatConfigBuilder_ = null; + } return this; } @@ -389,6 +708,23 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.PairwiseMetricSpec res result.metricPromptTemplate_ = metricPromptTemplate_; to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.candidateResponseFieldName_ = candidateResponseFieldName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.baselineResponseFieldName_ = baselineResponseFieldName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.systemInstruction_ = systemInstruction_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.customOutputFormatConfig_ = + customOutputFormatConfigBuilder_ == null + ? customOutputFormatConfig_ + : customOutputFormatConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } result.bitField0_ |= to_bitField0_; } @@ -410,6 +746,24 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.PairwiseMetricSpec other bitField0_ |= 0x00000001; onChanged(); } + if (!other.getCandidateResponseFieldName().isEmpty()) { + candidateResponseFieldName_ = other.candidateResponseFieldName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBaselineResponseFieldName().isEmpty()) { + baselineResponseFieldName_ = other.baselineResponseFieldName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSystemInstruction()) { + systemInstruction_ = other.systemInstruction_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCustomOutputFormatConfig()) { + mergeCustomOutputFormatConfig(other.getCustomOutputFormatConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -442,6 +796,32 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + candidateResponseFieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + baselineResponseFieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + systemInstruction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCustomOutputFormatConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -593,6 +973,624 @@ public Builder setMetricPromptTemplateBytes(com.google.protobuf.ByteString value return this; } + private java.lang.Object candidateResponseFieldName_ = ""; + + /** + * + * + *
+     * Optional. The field name of the candidate response.
+     * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The candidateResponseFieldName. + */ + public java.lang.String getCandidateResponseFieldName() { + java.lang.Object ref = candidateResponseFieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + candidateResponseFieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The field name of the candidate response.
+     * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for candidateResponseFieldName. + */ + public com.google.protobuf.ByteString getCandidateResponseFieldNameBytes() { + java.lang.Object ref = candidateResponseFieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + candidateResponseFieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The field name of the candidate response.
+     * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The candidateResponseFieldName to set. + * @return This builder for chaining. + */ + public Builder setCandidateResponseFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + candidateResponseFieldName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field name of the candidate response.
+     * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearCandidateResponseFieldName() { + candidateResponseFieldName_ = getDefaultInstance().getCandidateResponseFieldName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field name of the candidate response.
+     * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for candidateResponseFieldName to set. + * @return This builder for chaining. + */ + public Builder setCandidateResponseFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + candidateResponseFieldName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object baselineResponseFieldName_ = ""; + + /** + * + * + *
+     * Optional. The field name of the baseline response.
+     * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The baselineResponseFieldName. + */ + public java.lang.String getBaselineResponseFieldName() { + java.lang.Object ref = baselineResponseFieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baselineResponseFieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The field name of the baseline response.
+     * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for baselineResponseFieldName. + */ + public com.google.protobuf.ByteString getBaselineResponseFieldNameBytes() { + java.lang.Object ref = baselineResponseFieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baselineResponseFieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The field name of the baseline response.
+     * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The baselineResponseFieldName to set. + * @return This builder for chaining. + */ + public Builder setBaselineResponseFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + baselineResponseFieldName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field name of the baseline response.
+     * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBaselineResponseFieldName() { + baselineResponseFieldName_ = getDefaultInstance().getBaselineResponseFieldName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The field name of the baseline response.
+     * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for baselineResponseFieldName to set. + * @return This builder for chaining. + */ + public Builder setBaselineResponseFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + baselineResponseFieldName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object systemInstruction_ = ""; + + /** + * + * + *
+     * Optional. System instructions for pairwise metric.
+     * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. System instructions for pairwise metric.
+     * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + public java.lang.String getSystemInstruction() { + java.lang.Object ref = systemInstruction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + systemInstruction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. System instructions for pairwise metric.
+     * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for systemInstruction. + */ + public com.google.protobuf.ByteString getSystemInstructionBytes() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + systemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. System instructions for pairwise metric.
+     * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The systemInstruction to set. + * @return This builder for chaining. + */ + public Builder setSystemInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + systemInstruction_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. System instructions for pairwise metric.
+     * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSystemInstruction() { + systemInstruction_ = getDefaultInstance().getSystemInstruction(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. System instructions for pairwise metric.
+     * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for systemInstruction to set. + * @return This builder for chaining. + */ + public Builder setSystemInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + systemInstruction_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.CustomOutputFormatConfig customOutputFormatConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder> + customOutputFormatConfigBuilder_; + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customOutputFormatConfig field is set. + */ + public boolean hasCustomOutputFormatConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customOutputFormatConfig. + */ + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig getCustomOutputFormatConfig() { + if (customOutputFormatConfigBuilder_ == null) { + return customOutputFormatConfig_ == null + ? com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance() + : customOutputFormatConfig_; + } else { + return customOutputFormatConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomOutputFormatConfig( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig value) { + if (customOutputFormatConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customOutputFormatConfig_ = value; + } else { + customOutputFormatConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomOutputFormatConfig( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder builderForValue) { + if (customOutputFormatConfigBuilder_ == null) { + customOutputFormatConfig_ = builderForValue.build(); + } else { + customOutputFormatConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCustomOutputFormatConfig( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig value) { + if (customOutputFormatConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && customOutputFormatConfig_ != null + && customOutputFormatConfig_ + != com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance()) { + getCustomOutputFormatConfigBuilder().mergeFrom(value); + } else { + customOutputFormatConfig_ = value; + } + } else { + customOutputFormatConfigBuilder_.mergeFrom(value); + } + if (customOutputFormatConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCustomOutputFormatConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + customOutputFormatConfig_ = null; + if (customOutputFormatConfigBuilder_ != null) { + customOutputFormatConfigBuilder_.dispose(); + customOutputFormatConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder + getCustomOutputFormatConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetCustomOutputFormatConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder + getCustomOutputFormatConfigOrBuilder() { + if (customOutputFormatConfigBuilder_ != null) { + return customOutputFormatConfigBuilder_.getMessageOrBuilder(); + } else { + return customOutputFormatConfig_ == null + ? com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance() + : customOutputFormatConfig_; + } + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * When this config is set, the default output is replaced with
+     * the raw output string.
+     * If a custom format is chosen, the `pairwise_choice` and `explanation`
+     * fields in the corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder> + internalGetCustomOutputFormatConfigFieldBuilder() { + if (customOutputFormatConfigBuilder_ == null) { + customOutputFormatConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder>( + getCustomOutputFormatConfig(), getParentForChildren(), isClean()); + customOutputFormatConfig_ = null; + } + return customOutputFormatConfigBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PairwiseMetricSpec) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricSpecOrBuilder.java index a2663701ad27..8c80364da898 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PairwiseMetricSpecOrBuilder.java @@ -67,4 +67,153 @@ public interface PairwiseMetricSpecOrBuilder * @return The bytes for metricPromptTemplate. */ com.google.protobuf.ByteString getMetricPromptTemplateBytes(); + + /** + * + * + *
+   * Optional. The field name of the candidate response.
+   * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The candidateResponseFieldName. + */ + java.lang.String getCandidateResponseFieldName(); + + /** + * + * + *
+   * Optional. The field name of the candidate response.
+   * 
+ * + * string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for candidateResponseFieldName. + */ + com.google.protobuf.ByteString getCandidateResponseFieldNameBytes(); + + /** + * + * + *
+   * Optional. The field name of the baseline response.
+   * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The baselineResponseFieldName. + */ + java.lang.String getBaselineResponseFieldName(); + + /** + * + * + *
+   * Optional. The field name of the baseline response.
+   * 
+ * + * string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for baselineResponseFieldName. + */ + com.google.protobuf.ByteString getBaselineResponseFieldNameBytes(); + + /** + * + * + *
+   * Optional. System instructions for pairwise metric.
+   * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the systemInstruction field is set. + */ + boolean hasSystemInstruction(); + + /** + * + * + *
+   * Optional. System instructions for pairwise metric.
+   * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + java.lang.String getSystemInstruction(); + + /** + * + * + *
+   * Optional. System instructions for pairwise metric.
+   * 
+ * + * optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + com.google.protobuf.ByteString getSystemInstructionBytes(); + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * When this config is set, the default output is replaced with
+   * the raw output string.
+   * If a custom format is chosen, the `pairwise_choice` and `explanation`
+   * fields in the corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customOutputFormatConfig field is set. + */ + boolean hasCustomOutputFormatConfig(); + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * When this config is set, the default output is replaced with
+   * the raw output string.
+   * If a custom format is chosen, the `pairwise_choice` and `explanation`
+   * fields in the corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customOutputFormatConfig. + */ + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig getCustomOutputFormatConfig(); + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * When this config is set, the default output is replaced with
+   * the raw output string.
+   * If a custom format is chosen, the `pairwise_choice` and `explanation`
+   * fields in the corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder + getCustomOutputFormatConfigOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricInstance.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricInstance.java index 3bbf8664f4da..c0ef4259bc46 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricInstance.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricInstance.java @@ -79,6 +79,7 @@ public enum InstanceCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { JSON_INSTANCE(1), + CONTENT_MAP_INSTANCE(2), INSTANCE_NOT_SET(0); private final int value; @@ -100,6 +101,8 @@ public static InstanceCase forNumber(int value) { switch (value) { case 1: return JSON_INSTANCE; + case 2: + return CONTENT_MAP_INSTANCE; case 0: return INSTANCE_NOT_SET; default: @@ -195,6 +198,66 @@ public com.google.protobuf.ByteString getJsonInstanceBytes() { } } + public static final int CONTENT_MAP_INSTANCE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return Whether the contentMapInstance field is set. + */ + @java.lang.Override + public boolean hasContentMapInstance() { + return instanceCase_ == 2; + } + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return The contentMapInstance. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap getContentMapInstance() { + if (instanceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.ContentMap) instance_; + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMapOrBuilder getContentMapInstanceOrBuilder() { + if (instanceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.ContentMap) instance_; + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -212,6 +275,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceCase_ == 1) { com.google.protobuf.GeneratedMessage.writeString(output, 1, instance_); } + if (instanceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1.ContentMap) instance_); + } getUnknownFields().writeTo(output); } @@ -224,6 +290,11 @@ public int getSerializedSize() { if (instanceCase_ == 1) { size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instance_); } + if (instanceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.ContentMap) instance_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -245,6 +316,9 @@ public boolean equals(final java.lang.Object obj) { case 1: if (!getJsonInstance().equals(other.getJsonInstance())) return false; break; + case 2: + if (!getContentMapInstance().equals(other.getContentMapInstance())) return false; + break; case 0: default: } @@ -264,6 +338,10 @@ public int hashCode() { hash = (37 * hash) + JSON_INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getJsonInstance().hashCode(); break; + case 2: + hash = (37 * hash) + CONTENT_MAP_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getContentMapInstance().hashCode(); + break; case 0: default: } @@ -409,6 +487,9 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; + if (contentMapInstanceBuilder_ != null) { + contentMapInstanceBuilder_.clear(); + } instanceCase_ = 0; instance_ = null; return this; @@ -453,6 +534,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.PointwiseMetricInstanc private void buildPartialOneofs(com.google.cloud.aiplatform.v1.PointwiseMetricInstance result) { result.instanceCase_ = instanceCase_; result.instance_ = this.instance_; + if (instanceCase_ == 2 && contentMapInstanceBuilder_ != null) { + result.instance_ = contentMapInstanceBuilder_.build(); + } } @java.lang.Override @@ -476,6 +560,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.PointwiseMetricInstance onChanged(); break; } + case CONTENT_MAP_INSTANCE: + { + mergeContentMapInstance(other.getContentMapInstance()); + break; + } case INSTANCE_NOT_SET: { break; @@ -514,6 +603,13 @@ public Builder mergeFrom( instance_ = s; break; } // case 10 + case 18: + { + input.readMessage( + internalGetContentMapInstanceFieldBuilder().getBuilder(), extensionRegistry); + instanceCase_ = 2; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -698,6 +794,242 @@ public Builder setJsonInstanceBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ContentMap, + com.google.cloud.aiplatform.v1.ContentMap.Builder, + com.google.cloud.aiplatform.v1.ContentMapOrBuilder> + contentMapInstanceBuilder_; + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return Whether the contentMapInstance field is set. + */ + @java.lang.Override + public boolean hasContentMapInstance() { + return instanceCase_ == 2; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return The contentMapInstance. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMap getContentMapInstance() { + if (contentMapInstanceBuilder_ == null) { + if (instanceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.ContentMap) instance_; + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } else { + if (instanceCase_ == 2) { + return contentMapInstanceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public Builder setContentMapInstance(com.google.cloud.aiplatform.v1.ContentMap value) { + if (contentMapInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + contentMapInstanceBuilder_.setMessage(value); + } + instanceCase_ = 2; + return this; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public Builder setContentMapInstance( + com.google.cloud.aiplatform.v1.ContentMap.Builder builderForValue) { + if (contentMapInstanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + contentMapInstanceBuilder_.setMessage(builderForValue.build()); + } + instanceCase_ = 2; + return this; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public Builder mergeContentMapInstance(com.google.cloud.aiplatform.v1.ContentMap value) { + if (contentMapInstanceBuilder_ == null) { + if (instanceCase_ == 2 + && instance_ != com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance()) { + instance_ = + com.google.cloud.aiplatform.v1.ContentMap.newBuilder( + (com.google.cloud.aiplatform.v1.ContentMap) instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + if (instanceCase_ == 2) { + contentMapInstanceBuilder_.mergeFrom(value); + } else { + contentMapInstanceBuilder_.setMessage(value); + } + } + instanceCase_ = 2; + return this; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public Builder clearContentMapInstance() { + if (contentMapInstanceBuilder_ == null) { + if (instanceCase_ == 2) { + instanceCase_ = 0; + instance_ = null; + onChanged(); + } + } else { + if (instanceCase_ == 2) { + instanceCase_ = 0; + instance_ = null; + } + contentMapInstanceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + public com.google.cloud.aiplatform.v1.ContentMap.Builder getContentMapInstanceBuilder() { + return internalGetContentMapInstanceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentMapOrBuilder getContentMapInstanceOrBuilder() { + if ((instanceCase_ == 2) && (contentMapInstanceBuilder_ != null)) { + return contentMapInstanceBuilder_.getMessageOrBuilder(); + } else { + if (instanceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.ContentMap) instance_; + } + return com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Key-value contents for the mutlimodality input, including text, image,
+     * video, audio, and pdf, etc. The key is placeholder in metric prompt
+     * template, and the value is the multimodal content.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ContentMap, + com.google.cloud.aiplatform.v1.ContentMap.Builder, + com.google.cloud.aiplatform.v1.ContentMapOrBuilder> + internalGetContentMapInstanceFieldBuilder() { + if (contentMapInstanceBuilder_ == null) { + if (!(instanceCase_ == 2)) { + instance_ = com.google.cloud.aiplatform.v1.ContentMap.getDefaultInstance(); + } + contentMapInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.ContentMap, + com.google.cloud.aiplatform.v1.ContentMap.Builder, + com.google.cloud.aiplatform.v1.ContentMapOrBuilder>( + (com.google.cloud.aiplatform.v1.ContentMap) instance_, + getParentForChildren(), + isClean()); + instance_ = null; + } + instanceCase_ = 2; + onChanged(); + return contentMapInstanceBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PointwiseMetricInstance) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricInstanceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricInstanceOrBuilder.java index fb7931ffe12d..2693d69fc780 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricInstanceOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricInstanceOrBuilder.java @@ -71,5 +71,48 @@ public interface PointwiseMetricInstanceOrBuilder */ com.google.protobuf.ByteString getJsonInstanceBytes(); + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return Whether the contentMapInstance field is set. + */ + boolean hasContentMapInstance(); + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + * + * @return The contentMapInstance. + */ + com.google.cloud.aiplatform.v1.ContentMap getContentMapInstance(); + + /** + * + * + *
+   * Key-value contents for the mutlimodality input, including text, image,
+   * video, audio, and pdf, etc. The key is placeholder in metric prompt
+   * template, and the value is the multimodal content.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContentMap content_map_instance = 2; + */ + com.google.cloud.aiplatform.v1.ContentMapOrBuilder getContentMapInstanceOrBuilder(); + com.google.cloud.aiplatform.v1.PointwiseMetricInstance.InstanceCase getInstanceCase(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricResult.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricResult.java index cea6c782944a..8d5f4e89a81c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricResult.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricResult.java @@ -159,6 +159,65 @@ public com.google.protobuf.ByteString getExplanationBytes() { } } + public static final int CUSTOM_OUTPUT_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.CustomOutput customOutput_; + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the customOutput field is set. + */ + @java.lang.Override + public boolean hasCustomOutput() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The customOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutput getCustomOutput() { + return customOutput_ == null + ? com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance() + : customOutput_; + } + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputOrBuilder getCustomOutputOrBuilder() { + return customOutput_ == null + ? com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance() + : customOutput_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -179,6 +238,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explanation_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, explanation_); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getCustomOutput()); + } getUnknownFields().writeTo(output); } @@ -194,6 +256,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explanation_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, explanation_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCustomOutput()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -216,6 +281,10 @@ public boolean equals(final java.lang.Object obj) { != java.lang.Float.floatToIntBits(other.getScore())) return false; } if (!getExplanation().equals(other.getExplanation())) return false; + if (hasCustomOutput() != other.hasCustomOutput()) return false; + if (hasCustomOutput()) { + if (!getCustomOutput().equals(other.getCustomOutput())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -233,6 +302,10 @@ public int hashCode() { } hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; hash = (53 * hash) + getExplanation().hashCode(); + if (hasCustomOutput()) { + hash = (37 * hash) + CUSTOM_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getCustomOutput().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -363,10 +436,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.aiplatform.v1.PointwiseMetricResult.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) { + internalGetCustomOutputFieldBuilder(); + } } @java.lang.Override @@ -375,6 +457,11 @@ public Builder clear() { bitField0_ = 0; score_ = 0F; explanation_ = ""; + customOutput_ = null; + if (customOutputBuilder_ != null) { + customOutputBuilder_.dispose(); + customOutputBuilder_ = null; + } return this; } @@ -419,6 +506,11 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.PointwiseMetricResult if (((from_bitField0_ & 0x00000002) != 0)) { result.explanation_ = explanation_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.customOutput_ = + customOutputBuilder_ == null ? customOutput_ : customOutputBuilder_.build(); + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -443,6 +535,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.PointwiseMetricResult ot bitField0_ |= 0x00000002; onChanged(); } + if (other.hasCustomOutput()) { + mergeCustomOutput(other.getCustomOutput()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -481,6 +576,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + input.readMessage( + internalGetCustomOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -683,6 +785,219 @@ public Builder setExplanationBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.aiplatform.v1.CustomOutput customOutput_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutput, + com.google.cloud.aiplatform.v1.CustomOutput.Builder, + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder> + customOutputBuilder_; + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the customOutput field is set. + */ + public boolean hasCustomOutput() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The customOutput. + */ + public com.google.cloud.aiplatform.v1.CustomOutput getCustomOutput() { + if (customOutputBuilder_ == null) { + return customOutput_ == null + ? com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance() + : customOutput_; + } else { + return customOutputBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCustomOutput(com.google.cloud.aiplatform.v1.CustomOutput value) { + if (customOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customOutput_ = value; + } else { + customOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCustomOutput( + com.google.cloud.aiplatform.v1.CustomOutput.Builder builderForValue) { + if (customOutputBuilder_ == null) { + customOutput_ = builderForValue.build(); + } else { + customOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCustomOutput(com.google.cloud.aiplatform.v1.CustomOutput value) { + if (customOutputBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && customOutput_ != null + && customOutput_ != com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance()) { + getCustomOutputBuilder().mergeFrom(value); + } else { + customOutput_ = value; + } + } else { + customOutputBuilder_.mergeFrom(value); + } + if (customOutput_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCustomOutput() { + bitField0_ = (bitField0_ & ~0x00000004); + customOutput_ = null; + if (customOutputBuilder_ != null) { + customOutputBuilder_.dispose(); + customOutputBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.CustomOutput.Builder getCustomOutputBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCustomOutputFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.CustomOutputOrBuilder getCustomOutputOrBuilder() { + if (customOutputBuilder_ != null) { + return customOutputBuilder_.getMessageOrBuilder(); + } else { + return customOutput_ == null + ? com.google.cloud.aiplatform.v1.CustomOutput.getDefaultInstance() + : customOutput_; + } + } + + /** + * + * + *
+     * Output only. Spec for custom output.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutput, + com.google.cloud.aiplatform.v1.CustomOutput.Builder, + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder> + internalGetCustomOutputFieldBuilder() { + if (customOutputBuilder_ == null) { + customOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutput, + com.google.cloud.aiplatform.v1.CustomOutput.Builder, + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder>( + getCustomOutput(), getParentForChildren(), isClean()); + customOutput_ = null; + } + return customOutputBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PointwiseMetricResult) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricResultOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricResultOrBuilder.java index 40d07ad48e22..bdf7ec599d3a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricResultOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricResultOrBuilder.java @@ -77,4 +77,47 @@ public interface PointwiseMetricResultOrBuilder * @return The bytes for explanation. */ com.google.protobuf.ByteString getExplanationBytes(); + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the customOutput field is set. + */ + boolean hasCustomOutput(); + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The customOutput. + */ + com.google.cloud.aiplatform.v1.CustomOutput getCustomOutput(); + + /** + * + * + *
+   * Output only. Spec for custom output.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutput custom_output = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.CustomOutputOrBuilder getCustomOutputOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricSpec.java index 224cfcec15f9..3cd10e10fd62 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricSpec.java @@ -53,6 +53,7 @@ private PointwiseMetricSpec(com.google.protobuf.GeneratedMessage.Builder buil private PointwiseMetricSpec() { metricPromptTemplate_ = ""; + systemInstruction_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -143,6 +144,153 @@ public com.google.protobuf.ByteString getMetricPromptTemplateBytes() { } } + public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object systemInstruction_ = ""; + + /** + * + * + *
+   * Optional. System instructions for pointwise metric.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the systemInstruction field is set. + */ + @java.lang.Override + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. System instructions for pointwise metric.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + @java.lang.Override + public java.lang.String getSystemInstruction() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + systemInstruction_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. System instructions for pointwise metric.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSystemInstructionBytes() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + systemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_OUTPUT_FORMAT_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.CustomOutputFormatConfig customOutputFormatConfig_; + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * By default, metrics return a score and explanation.
+   * When this config is set, the default output is replaced with either:
+   * - The raw output string.
+   * - A parsed output based on a user-defined schema.
+   * If a custom format is chosen, the `score` and `explanation` fields in the
+   * corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customOutputFormatConfig field is set. + */ + @java.lang.Override + public boolean hasCustomOutputFormatConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * By default, metrics return a score and explanation.
+   * When this config is set, the default output is replaced with either:
+   * - The raw output string.
+   * - A parsed output based on a user-defined schema.
+   * If a custom format is chosen, the `score` and `explanation` fields in the
+   * corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customOutputFormatConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig getCustomOutputFormatConfig() { + return customOutputFormatConfig_ == null + ? com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance() + : customOutputFormatConfig_; + } + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * By default, metrics return a score and explanation.
+   * When this config is set, the default output is replaced with either:
+   * - The raw output string.
+   * - A parsed output based on a user-defined schema.
+   * If a custom format is chosen, the `score` and `explanation` fields in the
+   * corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder + getCustomOutputFormatConfigOrBuilder() { + return customOutputFormatConfig_ == null + ? com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance() + : customOutputFormatConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -160,6 +308,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessage.writeString(output, 1, metricPromptTemplate_); } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, systemInstruction_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getCustomOutputFormatConfig()); + } getUnknownFields().writeTo(output); } @@ -172,6 +326,14 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(1, metricPromptTemplate_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, systemInstruction_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getCustomOutputFormatConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -192,6 +354,14 @@ public boolean equals(final java.lang.Object obj) { if (hasMetricPromptTemplate()) { if (!getMetricPromptTemplate().equals(other.getMetricPromptTemplate())) return false; } + if (hasSystemInstruction() != other.hasSystemInstruction()) return false; + if (hasSystemInstruction()) { + if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; + } + if (hasCustomOutputFormatConfig() != other.hasCustomOutputFormatConfig()) return false; + if (hasCustomOutputFormatConfig()) { + if (!getCustomOutputFormatConfig().equals(other.getCustomOutputFormatConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -207,6 +377,14 @@ public int hashCode() { hash = (37 * hash) + METRIC_PROMPT_TEMPLATE_FIELD_NUMBER; hash = (53 * hash) + getMetricPromptTemplate().hashCode(); } + if (hasSystemInstruction()) { + hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getSystemInstruction().hashCode(); + } + if (hasCustomOutputFormatConfig()) { + hash = (37 * hash) + CUSTOM_OUTPUT_FORMAT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCustomOutputFormatConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -337,10 +515,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.aiplatform.v1.PointwiseMetricSpec.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) { + internalGetCustomOutputFormatConfigFieldBuilder(); + } } @java.lang.Override @@ -348,6 +535,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; metricPromptTemplate_ = ""; + systemInstruction_ = ""; + customOutputFormatConfig_ = null; + if (customOutputFormatConfigBuilder_ != null) { + customOutputFormatConfigBuilder_.dispose(); + customOutputFormatConfigBuilder_ = null; + } return this; } @@ -389,6 +582,17 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.PointwiseMetricSpec re result.metricPromptTemplate_ = metricPromptTemplate_; to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.systemInstruction_ = systemInstruction_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.customOutputFormatConfig_ = + customOutputFormatConfigBuilder_ == null + ? customOutputFormatConfig_ + : customOutputFormatConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } result.bitField0_ |= to_bitField0_; } @@ -410,6 +614,14 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.PointwiseMetricSpec othe bitField0_ |= 0x00000001; onChanged(); } + if (other.hasSystemInstruction()) { + systemInstruction_ = other.systemInstruction_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCustomOutputFormatConfig()) { + mergeCustomOutputFormatConfig(other.getCustomOutputFormatConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -442,6 +654,20 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + systemInstruction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCustomOutputFormatConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -593,6 +819,410 @@ public Builder setMetricPromptTemplateBytes(com.google.protobuf.ByteString value return this; } + private java.lang.Object systemInstruction_ = ""; + + /** + * + * + *
+     * Optional. System instructions for pointwise metric.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. System instructions for pointwise metric.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + public java.lang.String getSystemInstruction() { + java.lang.Object ref = systemInstruction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + systemInstruction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. System instructions for pointwise metric.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for systemInstruction. + */ + public com.google.protobuf.ByteString getSystemInstructionBytes() { + java.lang.Object ref = systemInstruction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + systemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. System instructions for pointwise metric.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The systemInstruction to set. + * @return This builder for chaining. + */ + public Builder setSystemInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + systemInstruction_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. System instructions for pointwise metric.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSystemInstruction() { + systemInstruction_ = getDefaultInstance().getSystemInstruction(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. System instructions for pointwise metric.
+     * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for systemInstruction to set. + * @return This builder for chaining. + */ + public Builder setSystemInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + systemInstruction_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.CustomOutputFormatConfig customOutputFormatConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder> + customOutputFormatConfigBuilder_; + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customOutputFormatConfig field is set. + */ + public boolean hasCustomOutputFormatConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customOutputFormatConfig. + */ + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig getCustomOutputFormatConfig() { + if (customOutputFormatConfigBuilder_ == null) { + return customOutputFormatConfig_ == null + ? com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance() + : customOutputFormatConfig_; + } else { + return customOutputFormatConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomOutputFormatConfig( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig value) { + if (customOutputFormatConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customOutputFormatConfig_ = value; + } else { + customOutputFormatConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomOutputFormatConfig( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder builderForValue) { + if (customOutputFormatConfigBuilder_ == null) { + customOutputFormatConfig_ = builderForValue.build(); + } else { + customOutputFormatConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCustomOutputFormatConfig( + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig value) { + if (customOutputFormatConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && customOutputFormatConfig_ != null + && customOutputFormatConfig_ + != com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance()) { + getCustomOutputFormatConfigBuilder().mergeFrom(value); + } else { + customOutputFormatConfig_ = value; + } + } else { + customOutputFormatConfigBuilder_.mergeFrom(value); + } + if (customOutputFormatConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCustomOutputFormatConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + customOutputFormatConfig_ = null; + if (customOutputFormatConfigBuilder_ != null) { + customOutputFormatConfigBuilder_.dispose(); + customOutputFormatConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder + getCustomOutputFormatConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCustomOutputFormatConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder + getCustomOutputFormatConfigOrBuilder() { + if (customOutputFormatConfigBuilder_ != null) { + return customOutputFormatConfigBuilder_.getMessageOrBuilder(); + } else { + return customOutputFormatConfig_ == null + ? com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.getDefaultInstance() + : customOutputFormatConfig_; + } + } + + /** + * + * + *
+     * Optional. CustomOutputFormatConfig allows customization of metric output.
+     * By default, metrics return a score and explanation.
+     * When this config is set, the default output is replaced with either:
+     * - The raw output string.
+     * - A parsed output based on a user-defined schema.
+     * If a custom format is chosen, the `score` and `explanation` fields in the
+     * corresponding metric result will be empty.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder> + internalGetCustomOutputFormatConfigFieldBuilder() { + if (customOutputFormatConfigBuilder_ == null) { + customOutputFormatConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig.Builder, + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder>( + getCustomOutputFormatConfig(), getParentForChildren(), isClean()); + customOutputFormatConfig_ = null; + } + return customOutputFormatConfigBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PointwiseMetricSpec) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricSpecOrBuilder.java index 85321e6d712e..6f95ccdfdabc 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PointwiseMetricSpecOrBuilder.java @@ -67,4 +67,105 @@ public interface PointwiseMetricSpecOrBuilder * @return The bytes for metricPromptTemplate. */ com.google.protobuf.ByteString getMetricPromptTemplateBytes(); + + /** + * + * + *
+   * Optional. System instructions for pointwise metric.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the systemInstruction field is set. + */ + boolean hasSystemInstruction(); + + /** + * + * + *
+   * Optional. System instructions for pointwise metric.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The systemInstruction. + */ + java.lang.String getSystemInstruction(); + + /** + * + * + *
+   * Optional. System instructions for pointwise metric.
+   * 
+ * + * optional string system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for systemInstruction. + */ + com.google.protobuf.ByteString getSystemInstructionBytes(); + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * By default, metrics return a score and explanation.
+   * When this config is set, the default output is replaced with either:
+   * - The raw output string.
+   * - A parsed output based on a user-defined schema.
+   * If a custom format is chosen, the `score` and `explanation` fields in the
+   * corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customOutputFormatConfig field is set. + */ + boolean hasCustomOutputFormatConfig(); + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * By default, metrics return a score and explanation.
+   * When this config is set, the default output is replaced with either:
+   * - The raw output string.
+   * - A parsed output based on a user-defined schema.
+   * If a custom format is chosen, the `score` and `explanation` fields in the
+   * corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customOutputFormatConfig. + */ + com.google.cloud.aiplatform.v1.CustomOutputFormatConfig getCustomOutputFormatConfig(); + + /** + * + * + *
+   * Optional. CustomOutputFormatConfig allows customization of metric output.
+   * By default, metrics return a score and explanation.
+   * When this config is set, the default output is replaced with either:
+   * - The raw output string.
+   * - A parsed output based on a user-defined schema.
+   * If a custom format is chosen, the `score` and `explanation` fields in the
+   * corresponding metric result will be empty.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.CustomOutputFormatConfigOrBuilder + getCustomOutputFormatConfigOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedMetricSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedMetricSpec.java new file mode 100644 index 000000000000..a60ccafac13d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedMetricSpec.java @@ -0,0 +1,923 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The spec for a pre-defined metric.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredefinedMetricSpec} + */ +@com.google.protobuf.Generated +public final class PredefinedMetricSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PredefinedMetricSpec) + PredefinedMetricSpecOrBuilder { + 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= */ "", + "PredefinedMetricSpec"); + } + + // Use PredefinedMetricSpec.newBuilder() to construct. + private PredefinedMetricSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PredefinedMetricSpec() { + metricSpecName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.class, + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder.class); + } + + private int bitField0_; + public static final int METRIC_SPEC_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object metricSpecName_ = ""; + + /** + * + * + *
+   * Required. The name of a pre-defined metric, such as
+   * "instruction_following_v1" or "text_quality_v1".
+   * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricSpecName. + */ + @java.lang.Override + public java.lang.String getMetricSpecName() { + java.lang.Object ref = metricSpecName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricSpecName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of a pre-defined metric, such as
+   * "instruction_following_v1" or "text_quality_v1".
+   * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricSpecName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricSpecNameBytes() { + java.lang.Object ref = metricSpecName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricSpecName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRIC_SPEC_PARAMETERS_FIELD_NUMBER = 2; + private com.google.protobuf.Struct metricSpecParameters_; + + /** + * + * + *
+   * Optional. The parameters needed to run the pre-defined metric.
+   * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metricSpecParameters field is set. + */ + @java.lang.Override + public boolean hasMetricSpecParameters() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The parameters needed to run the pre-defined metric.
+   * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metricSpecParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getMetricSpecParameters() { + return metricSpecParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : metricSpecParameters_; + } + + /** + * + * + *
+   * Optional. The parameters needed to run the pre-defined metric.
+   * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getMetricSpecParametersOrBuilder() { + return metricSpecParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : metricSpecParameters_; + } + + 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(metricSpecName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, metricSpecName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMetricSpecParameters()); + } + 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(metricSpecName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, metricSpecName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetricSpecParameters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.PredefinedMetricSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PredefinedMetricSpec other = + (com.google.cloud.aiplatform.v1.PredefinedMetricSpec) obj; + + if (!getMetricSpecName().equals(other.getMetricSpecName())) return false; + if (hasMetricSpecParameters() != other.hasMetricSpecParameters()) return false; + if (hasMetricSpecParameters()) { + if (!getMetricSpecParameters().equals(other.getMetricSpecParameters())) 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) + METRIC_SPEC_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMetricSpecName().hashCode(); + if (hasMetricSpecParameters()) { + hash = (37 * hash) + METRIC_SPEC_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getMetricSpecParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.PredefinedMetricSpec 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 spec for a pre-defined metric.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredefinedMetricSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PredefinedMetricSpec) + com.google.cloud.aiplatform.v1.PredefinedMetricSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.class, + com.google.cloud.aiplatform.v1.PredefinedMetricSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PredefinedMetricSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMetricSpecParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metricSpecName_ = ""; + metricSpecParameters_ = null; + if (metricSpecParametersBuilder_ != null) { + metricSpecParametersBuilder_.dispose(); + metricSpecParametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_PredefinedMetricSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec build() { + com.google.cloud.aiplatform.v1.PredefinedMetricSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedMetricSpec buildPartial() { + com.google.cloud.aiplatform.v1.PredefinedMetricSpec result = + new com.google.cloud.aiplatform.v1.PredefinedMetricSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.PredefinedMetricSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metricSpecName_ = metricSpecName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metricSpecParameters_ = + metricSpecParametersBuilder_ == null + ? metricSpecParameters_ + : metricSpecParametersBuilder_.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.aiplatform.v1.PredefinedMetricSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.PredefinedMetricSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PredefinedMetricSpec other) { + if (other == com.google.cloud.aiplatform.v1.PredefinedMetricSpec.getDefaultInstance()) + return this; + if (!other.getMetricSpecName().isEmpty()) { + metricSpecName_ = other.metricSpecName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMetricSpecParameters()) { + mergeMetricSpecParameters(other.getMetricSpecParameters()); + } + 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: + { + metricSpecName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetMetricSpecParametersFieldBuilder().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 metricSpecName_ = ""; + + /** + * + * + *
+     * Required. The name of a pre-defined metric, such as
+     * "instruction_following_v1" or "text_quality_v1".
+     * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricSpecName. + */ + public java.lang.String getMetricSpecName() { + java.lang.Object ref = metricSpecName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricSpecName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of a pre-defined metric, such as
+     * "instruction_following_v1" or "text_quality_v1".
+     * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricSpecName. + */ + public com.google.protobuf.ByteString getMetricSpecNameBytes() { + java.lang.Object ref = metricSpecName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricSpecName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of a pre-defined metric, such as
+     * "instruction_following_v1" or "text_quality_v1".
+     * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The metricSpecName to set. + * @return This builder for chaining. + */ + public Builder setMetricSpecName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + metricSpecName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of a pre-defined metric, such as
+     * "instruction_following_v1" or "text_quality_v1".
+     * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMetricSpecName() { + metricSpecName_ = getDefaultInstance().getMetricSpecName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of a pre-defined metric, such as
+     * "instruction_following_v1" or "text_quality_v1".
+     * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for metricSpecName to set. + * @return This builder for chaining. + */ + public Builder setMetricSpecNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + metricSpecName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Struct metricSpecParameters_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + metricSpecParametersBuilder_; + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metricSpecParameters field is set. + */ + public boolean hasMetricSpecParameters() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metricSpecParameters. + */ + public com.google.protobuf.Struct getMetricSpecParameters() { + if (metricSpecParametersBuilder_ == null) { + return metricSpecParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : metricSpecParameters_; + } else { + return metricSpecParametersBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetricSpecParameters(com.google.protobuf.Struct value) { + if (metricSpecParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricSpecParameters_ = value; + } else { + metricSpecParametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetricSpecParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (metricSpecParametersBuilder_ == null) { + metricSpecParameters_ = builderForValue.build(); + } else { + metricSpecParametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMetricSpecParameters(com.google.protobuf.Struct value) { + if (metricSpecParametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && metricSpecParameters_ != null + && metricSpecParameters_ != com.google.protobuf.Struct.getDefaultInstance()) { + getMetricSpecParametersBuilder().mergeFrom(value); + } else { + metricSpecParameters_ = value; + } + } else { + metricSpecParametersBuilder_.mergeFrom(value); + } + if (metricSpecParameters_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMetricSpecParameters() { + bitField0_ = (bitField0_ & ~0x00000002); + metricSpecParameters_ = null; + if (metricSpecParametersBuilder_ != null) { + metricSpecParametersBuilder_.dispose(); + metricSpecParametersBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getMetricSpecParametersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetMetricSpecParametersFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getMetricSpecParametersOrBuilder() { + if (metricSpecParametersBuilder_ != null) { + return metricSpecParametersBuilder_.getMessageOrBuilder(); + } else { + return metricSpecParameters_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : metricSpecParameters_; + } + } + + /** + * + * + *
+     * Optional. The parameters needed to run the pre-defined metric.
+     * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetMetricSpecParametersFieldBuilder() { + if (metricSpecParametersBuilder_ == null) { + metricSpecParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getMetricSpecParameters(), getParentForChildren(), isClean()); + metricSpecParameters_ = null; + } + return metricSpecParametersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PredefinedMetricSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PredefinedMetricSpec) + private static final com.google.cloud.aiplatform.v1.PredefinedMetricSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PredefinedMetricSpec(); + } + + public static com.google.cloud.aiplatform.v1.PredefinedMetricSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedMetricSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.PredefinedMetricSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedMetricSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedMetricSpecOrBuilder.java new file mode 100644 index 000000000000..10e2ecbae42a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedMetricSpecOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface PredefinedMetricSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PredefinedMetricSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of a pre-defined metric, such as
+   * "instruction_following_v1" or "text_quality_v1".
+   * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricSpecName. + */ + java.lang.String getMetricSpecName(); + + /** + * + * + *
+   * Required. The name of a pre-defined metric, such as
+   * "instruction_following_v1" or "text_quality_v1".
+   * 
+ * + * string metric_spec_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricSpecName. + */ + com.google.protobuf.ByteString getMetricSpecNameBytes(); + + /** + * + * + *
+   * Optional. The parameters needed to run the pre-defined metric.
+   * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metricSpecParameters field is set. + */ + boolean hasMetricSpecParameters(); + + /** + * + * + *
+   * Optional. The parameters needed to run the pre-defined metric.
+   * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metricSpecParameters. + */ + com.google.protobuf.Struct getMetricSpecParameters(); + + /** + * + * + *
+   * Optional. The parameters needed to run the pre-defined metric.
+   * 
+ * + * + * .google.protobuf.Struct metric_spec_parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getMetricSpecParametersOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RawOutput.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RawOutput.java new file mode 100644 index 000000000000..9786ae6d70ba --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RawOutput.java @@ -0,0 +1,695 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Raw output.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RawOutput} + */ +@com.google.protobuf.Generated +public final class RawOutput extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.RawOutput) + RawOutputOrBuilder { + 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= */ "", + "RawOutput"); + } + + // Use RawOutput.newBuilder() to construct. + private RawOutput(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RawOutput() { + rawOutput_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_RawOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_RawOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RawOutput.class, + com.google.cloud.aiplatform.v1.RawOutput.Builder.class); + } + + public static final int RAW_OUTPUT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList rawOutput_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. Raw output string.
+   * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the rawOutput. + */ + public com.google.protobuf.ProtocolStringList getRawOutputList() { + return rawOutput_; + } + + /** + * + * + *
+   * Output only. Raw output string.
+   * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of rawOutput. + */ + public int getRawOutputCount() { + return rawOutput_.size(); + } + + /** + * + * + *
+   * Output only. Raw output string.
+   * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The rawOutput at the given index. + */ + public java.lang.String getRawOutput(int index) { + return rawOutput_.get(index); + } + + /** + * + * + *
+   * Output only. Raw output string.
+   * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the rawOutput at the given index. + */ + public com.google.protobuf.ByteString getRawOutputBytes(int index) { + return rawOutput_.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 < rawOutput_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, rawOutput_.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 < rawOutput_.size(); i++) { + dataSize += computeStringSizeNoTag(rawOutput_.getRaw(i)); + } + size += dataSize; + size += 1 * getRawOutputList().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.aiplatform.v1.RawOutput)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.RawOutput other = (com.google.cloud.aiplatform.v1.RawOutput) obj; + + if (!getRawOutputList().equals(other.getRawOutputList())) 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 (getRawOutputCount() > 0) { + hash = (37 * hash) + RAW_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getRawOutputList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RawOutput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.RawOutput 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; + } + + /** + * + * + *
+   * Raw output.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RawOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.RawOutput) + com.google.cloud.aiplatform.v1.RawOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_RawOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_RawOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RawOutput.class, + com.google.cloud.aiplatform.v1.RawOutput.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.RawOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rawOutput_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EvaluationServiceProto + .internal_static_google_cloud_aiplatform_v1_RawOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RawOutput getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.RawOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RawOutput build() { + com.google.cloud.aiplatform.v1.RawOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RawOutput buildPartial() { + com.google.cloud.aiplatform.v1.RawOutput result = + new com.google.cloud.aiplatform.v1.RawOutput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.RawOutput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + rawOutput_.makeImmutable(); + result.rawOutput_ = rawOutput_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.RawOutput) { + return mergeFrom((com.google.cloud.aiplatform.v1.RawOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.RawOutput other) { + if (other == com.google.cloud.aiplatform.v1.RawOutput.getDefaultInstance()) return this; + if (!other.rawOutput_.isEmpty()) { + if (rawOutput_.isEmpty()) { + rawOutput_ = other.rawOutput_; + bitField0_ |= 0x00000001; + } else { + ensureRawOutputIsMutable(); + rawOutput_.addAll(other.rawOutput_); + } + 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(); + ensureRawOutputIsMutable(); + rawOutput_.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 rawOutput_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRawOutputIsMutable() { + if (!rawOutput_.isModifiable()) { + rawOutput_ = new com.google.protobuf.LazyStringArrayList(rawOutput_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the rawOutput. + */ + public com.google.protobuf.ProtocolStringList getRawOutputList() { + rawOutput_.makeImmutable(); + return rawOutput_; + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of rawOutput. + */ + public int getRawOutputCount() { + return rawOutput_.size(); + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The rawOutput at the given index. + */ + public java.lang.String getRawOutput(int index) { + return rawOutput_.get(index); + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the rawOutput at the given index. + */ + public com.google.protobuf.ByteString getRawOutputBytes(int index) { + return rawOutput_.getByteString(index); + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The rawOutput to set. + * @return This builder for chaining. + */ + public Builder setRawOutput(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawOutputIsMutable(); + rawOutput_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The rawOutput to add. + * @return This builder for chaining. + */ + public Builder addRawOutput(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawOutputIsMutable(); + rawOutput_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The rawOutput to add. + * @return This builder for chaining. + */ + public Builder addAllRawOutput(java.lang.Iterable values) { + ensureRawOutputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rawOutput_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRawOutput() { + rawOutput_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Raw output string.
+     * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the rawOutput to add. + * @return This builder for chaining. + */ + public Builder addRawOutputBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRawOutputIsMutable(); + rawOutput_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.RawOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.RawOutput) + private static final com.google.cloud.aiplatform.v1.RawOutput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.RawOutput(); + } + + public static com.google.cloud.aiplatform.v1.RawOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RawOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.aiplatform.v1.RawOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RawOutputOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RawOutputOrBuilder.java new file mode 100644 index 000000000000..ee33f392e273 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RawOutputOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/aiplatform/v1/evaluation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.aiplatform.v1; + +@com.google.protobuf.Generated +public interface RawOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.RawOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Raw output string.
+   * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the rawOutput. + */ + java.util.List getRawOutputList(); + + /** + * + * + *
+   * Output only. Raw output string.
+   * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of rawOutput. + */ + int getRawOutputCount(); + + /** + * + * + *
+   * Output only. Raw output string.
+   * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The rawOutput at the given index. + */ + java.lang.String getRawOutput(int index); + + /** + * + * + *
+   * Output only. Raw output string.
+   * 
+ * + * repeated string raw_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the rawOutput at the given index. + */ + com.google.protobuf.ByteString getRawOutputBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java index 24290c51792e..ab7b6ac99c68 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java @@ -128,7 +128,7 @@ public long getTotalTuningCharacterCount() { * * * @deprecated google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count - * is deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 + * is deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=250 * @return The totalBillableCharacterCount. */ @java.lang.Override @@ -1476,7 +1476,7 @@ public Builder clearTotalTuningCharacterCount() { * * @deprecated * google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count is - * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 + * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=250 * @return The totalBillableCharacterCount. */ @java.lang.Override @@ -1498,7 +1498,7 @@ public long getTotalBillableCharacterCount() { * * @deprecated * google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count is - * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 + * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=250 * @param value The totalBillableCharacterCount to set. * @return This builder for chaining. */ @@ -1524,7 +1524,7 @@ public Builder setTotalBillableCharacterCount(long value) { * * @deprecated * google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count is - * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 + * deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=250 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java index af538681278d..8a478e823447 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java @@ -66,7 +66,7 @@ public interface SupervisedTuningDataStatsOrBuilder * * * @deprecated google.cloud.aiplatform.v1.SupervisedTuningDataStats.total_billable_character_count - * is deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=245 + * is deprecated. See google/cloud/aiplatform/v1/tuning_job.proto;l=250 * @return The totalBillableCharacterCount. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpec.java index ce1961371fb9..7139dc4504e2 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpec.java @@ -263,6 +263,65 @@ public boolean getExportLastCheckpointOnly() { return exportLastCheckpointOnly_; } + public static final int EVALUATION_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.EvaluationConfig evaluationConfig_; + + /** + * + * + *
+   * Optional. Evaluation Config for Tuning Job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationConfig field is set. + */ + @java.lang.Override + public boolean hasEvaluationConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Evaluation Config for Tuning Job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationConfig getEvaluationConfig() { + return evaluationConfig_ == null + ? com.google.cloud.aiplatform.v1.EvaluationConfig.getDefaultInstance() + : evaluationConfig_; + } + + /** + * + * + *
+   * Optional. Evaluation Config for Tuning Job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluationConfigOrBuilder getEvaluationConfigOrBuilder() { + return evaluationConfig_ == null + ? com.google.cloud.aiplatform.v1.EvaluationConfig.getDefaultInstance() + : evaluationConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -286,6 +345,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getHyperParameters()); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getEvaluationConfig()); + } if (exportLastCheckpointOnly_ != false) { output.writeBool(6, exportLastCheckpointOnly_); } @@ -307,6 +369,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHyperParameters()); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEvaluationConfig()); + } if (exportLastCheckpointOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, exportLastCheckpointOnly_); } @@ -333,6 +398,10 @@ public boolean equals(final java.lang.Object obj) { if (!getHyperParameters().equals(other.getHyperParameters())) return false; } if (getExportLastCheckpointOnly() != other.getExportLastCheckpointOnly()) return false; + if (hasEvaluationConfig() != other.hasEvaluationConfig()) return false; + if (hasEvaluationConfig()) { + if (!getEvaluationConfig().equals(other.getEvaluationConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,6 +423,10 @@ public int hashCode() { } hash = (37 * hash) + EXPORT_LAST_CHECKPOINT_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExportLastCheckpointOnly()); + if (hasEvaluationConfig()) { + hash = (37 * hash) + EVALUATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEvaluationConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -496,6 +569,7 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { internalGetHyperParametersFieldBuilder(); + internalGetEvaluationConfigFieldBuilder(); } } @@ -511,6 +585,11 @@ public Builder clear() { hyperParametersBuilder_ = null; } exportLastCheckpointOnly_ = false; + evaluationConfig_ = null; + if (evaluationConfigBuilder_ != null) { + evaluationConfigBuilder_.dispose(); + evaluationConfigBuilder_ = null; + } return this; } @@ -562,6 +641,11 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.SupervisedTuningSpec r if (((from_bitField0_ & 0x00000008) != 0)) { result.exportLastCheckpointOnly_ = exportLastCheckpointOnly_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.evaluationConfig_ = + evaluationConfigBuilder_ == null ? evaluationConfig_ : evaluationConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -594,6 +678,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.SupervisedTuningSpec oth if (other.getExportLastCheckpointOnly() != false) { setExportLastCheckpointOnly(other.getExportLastCheckpointOnly()); } + if (other.hasEvaluationConfig()) { + mergeEvaluationConfig(other.getEvaluationConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -639,6 +726,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 42: + { + input.readMessage( + internalGetEvaluationConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 case 48: { exportLastCheckpointOnly_ = input.readBool(); @@ -1176,6 +1270,220 @@ public Builder clearExportLastCheckpointOnly() { return this; } + private com.google.cloud.aiplatform.v1.EvaluationConfig evaluationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluationConfig, + com.google.cloud.aiplatform.v1.EvaluationConfig.Builder, + com.google.cloud.aiplatform.v1.EvaluationConfigOrBuilder> + evaluationConfigBuilder_; + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationConfig field is set. + */ + public boolean hasEvaluationConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationConfig. + */ + public com.google.cloud.aiplatform.v1.EvaluationConfig getEvaluationConfig() { + if (evaluationConfigBuilder_ == null) { + return evaluationConfig_ == null + ? com.google.cloud.aiplatform.v1.EvaluationConfig.getDefaultInstance() + : evaluationConfig_; + } else { + return evaluationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEvaluationConfig(com.google.cloud.aiplatform.v1.EvaluationConfig value) { + if (evaluationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + evaluationConfig_ = value; + } else { + evaluationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEvaluationConfig( + com.google.cloud.aiplatform.v1.EvaluationConfig.Builder builderForValue) { + if (evaluationConfigBuilder_ == null) { + evaluationConfig_ = builderForValue.build(); + } else { + evaluationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEvaluationConfig(com.google.cloud.aiplatform.v1.EvaluationConfig value) { + if (evaluationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && evaluationConfig_ != null + && evaluationConfig_ + != com.google.cloud.aiplatform.v1.EvaluationConfig.getDefaultInstance()) { + getEvaluationConfigBuilder().mergeFrom(value); + } else { + evaluationConfig_ = value; + } + } else { + evaluationConfigBuilder_.mergeFrom(value); + } + if (evaluationConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEvaluationConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + evaluationConfig_ = null; + if (evaluationConfigBuilder_ != null) { + evaluationConfigBuilder_.dispose(); + evaluationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluationConfig.Builder getEvaluationConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetEvaluationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluationConfigOrBuilder getEvaluationConfigOrBuilder() { + if (evaluationConfigBuilder_ != null) { + return evaluationConfigBuilder_.getMessageOrBuilder(); + } else { + return evaluationConfig_ == null + ? com.google.cloud.aiplatform.v1.EvaluationConfig.getDefaultInstance() + : evaluationConfig_; + } + } + + /** + * + * + *
+     * Optional. Evaluation Config for Tuning Job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluationConfig, + com.google.cloud.aiplatform.v1.EvaluationConfig.Builder, + com.google.cloud.aiplatform.v1.EvaluationConfigOrBuilder> + internalGetEvaluationConfigFieldBuilder() { + if (evaluationConfigBuilder_ == null) { + evaluationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluationConfig, + com.google.cloud.aiplatform.v1.EvaluationConfig.Builder, + com.google.cloud.aiplatform.v1.EvaluationConfigOrBuilder>( + getEvaluationConfig(), getParentForChildren(), isClean()); + evaluationConfig_ = null; + } + return evaluationConfigBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.SupervisedTuningSpec) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpecOrBuilder.java index 497c7b4f9cd3..bc27311a340e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpecOrBuilder.java @@ -139,4 +139,47 @@ public interface SupervisedTuningSpecOrBuilder * @return The exportLastCheckpointOnly. */ boolean getExportLastCheckpointOnly(); + + /** + * + * + *
+   * Optional. Evaluation Config for Tuning Job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationConfig field is set. + */ + boolean hasEvaluationConfig(); + + /** + * + * + *
+   * Optional. Evaluation Config for Tuning Job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationConfig. + */ + com.google.cloud.aiplatform.v1.EvaluationConfig getEvaluationConfig(); + + /** + * + * + *
+   * Optional. Evaluation Config for Tuning Job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EvaluationConfig evaluation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.EvaluationConfigOrBuilder getEvaluationConfigOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java index 05f8334d0d38..af1a5f564e35 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java @@ -58,6 +58,7 @@ private TuningJob() { state_ = 0; experiment_ = ""; serviceAccount_ = ""; + evaluateDatasetRuns_ = java.util.Collections.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -1319,6 +1320,94 @@ public com.google.protobuf.ByteString getServiceAccountBytes() { } } + public static final int EVALUATE_DATASET_RUNS_FIELD_NUMBER = 32; + + @SuppressWarnings("serial") + private java.util.List evaluateDatasetRuns_; + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getEvaluateDatasetRunsList() { + return evaluateDatasetRuns_; + } + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getEvaluateDatasetRunsOrBuilderList() { + return evaluateDatasetRuns_; + } + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getEvaluateDatasetRunsCount() { + return evaluateDatasetRuns_.size(); + } + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetRun getEvaluateDatasetRuns(int index) { + return evaluateDatasetRuns_.get(index); + } + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EvaluateDatasetRunOrBuilder getEvaluateDatasetRunsOrBuilder( + int index) { + return evaluateDatasetRuns_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1386,6 +1475,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceModelCase_ == 31) { output.writeMessage(31, (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_); } + for (int i = 0; i < evaluateDatasetRuns_.size(); i++) { + output.writeMessage(32, evaluateDatasetRuns_.get(i)); + } getUnknownFields().writeTo(output); } @@ -1460,6 +1552,10 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 31, (com.google.cloud.aiplatform.v1.PreTunedModel) sourceModel_); } + for (int i = 0; i < evaluateDatasetRuns_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(32, evaluateDatasetRuns_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1514,6 +1610,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; } if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getEvaluateDatasetRunsList().equals(other.getEvaluateDatasetRunsList())) return false; if (!getSourceModelCase().equals(other.getSourceModelCase())) return false; switch (sourceModelCase_) { case 4: @@ -1592,6 +1689,10 @@ public int hashCode() { } hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; hash = (53 * hash) + getServiceAccount().hashCode(); + if (getEvaluateDatasetRunsCount() > 0) { + hash = (37 * hash) + EVALUATE_DATASET_RUNS_FIELD_NUMBER; + hash = (53 * hash) + getEvaluateDatasetRunsList().hashCode(); + } switch (sourceModelCase_) { case 4: hash = (37 * hash) + BASE_MODEL_FIELD_NUMBER; @@ -1783,6 +1884,7 @@ private void maybeForceBuilderInitialization() { internalGetTunedModelFieldBuilder(); internalGetTuningDataStatsFieldBuilder(); internalGetEncryptionSpecFieldBuilder(); + internalGetEvaluateDatasetRunsFieldBuilder(); } } @@ -1843,6 +1945,13 @@ public Builder clear() { encryptionSpecBuilder_ = null; } serviceAccount_ = ""; + if (evaluateDatasetRunsBuilder_ == null) { + evaluateDatasetRuns_ = java.util.Collections.emptyList(); + } else { + evaluateDatasetRuns_ = null; + evaluateDatasetRunsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00040000); sourceModelCase_ = 0; sourceModel_ = null; tuningSpecCase_ = 0; @@ -1874,6 +1983,7 @@ public com.google.cloud.aiplatform.v1.TuningJob build() { public com.google.cloud.aiplatform.v1.TuningJob buildPartial() { com.google.cloud.aiplatform.v1.TuningJob result = new com.google.cloud.aiplatform.v1.TuningJob(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -1882,6 +1992,18 @@ public com.google.cloud.aiplatform.v1.TuningJob buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.cloud.aiplatform.v1.TuningJob result) { + if (evaluateDatasetRunsBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0)) { + evaluateDatasetRuns_ = java.util.Collections.unmodifiableList(evaluateDatasetRuns_); + bitField0_ = (bitField0_ & ~0x00040000); + } + result.evaluateDatasetRuns_ = evaluateDatasetRuns_; + } else { + result.evaluateDatasetRuns_ = evaluateDatasetRunsBuilder_.build(); + } + } + private void buildPartial0(com.google.cloud.aiplatform.v1.TuningJob result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000008) != 0)) { @@ -2023,6 +2145,33 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.TuningJob other) { bitField0_ |= 0x00020000; onChanged(); } + if (evaluateDatasetRunsBuilder_ == null) { + if (!other.evaluateDatasetRuns_.isEmpty()) { + if (evaluateDatasetRuns_.isEmpty()) { + evaluateDatasetRuns_ = other.evaluateDatasetRuns_; + bitField0_ = (bitField0_ & ~0x00040000); + } else { + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.addAll(other.evaluateDatasetRuns_); + } + onChanged(); + } + } else { + if (!other.evaluateDatasetRuns_.isEmpty()) { + if (evaluateDatasetRunsBuilder_.isEmpty()) { + evaluateDatasetRunsBuilder_.dispose(); + evaluateDatasetRunsBuilder_ = null; + evaluateDatasetRuns_ = other.evaluateDatasetRuns_; + bitField0_ = (bitField0_ & ~0x00040000); + evaluateDatasetRunsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEvaluateDatasetRunsFieldBuilder() + : null; + } else { + evaluateDatasetRunsBuilder_.addAllMessages(other.evaluateDatasetRuns_); + } + } + } switch (other.getSourceModelCase()) { case BASE_MODEL: { @@ -2201,6 +2350,20 @@ public Builder mergeFrom( sourceModelCase_ = 31; break; } // case 250 + case 258: + { + com.google.cloud.aiplatform.v1.EvaluateDatasetRun m = + input.readMessage( + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.parser(), + extensionRegistry); + if (evaluateDatasetRunsBuilder_ == null) { + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.add(m); + } else { + evaluateDatasetRunsBuilder_.addMessage(m); + } + break; + } // case 258 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5557,6 +5720,422 @@ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { return this; } + private java.util.List evaluateDatasetRuns_ = + java.util.Collections.emptyList(); + + private void ensureEvaluateDatasetRunsIsMutable() { + if (!((bitField0_ & 0x00040000) != 0)) { + evaluateDatasetRuns_ = + new java.util.ArrayList( + evaluateDatasetRuns_); + bitField0_ |= 0x00040000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluateDatasetRun, + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder, + com.google.cloud.aiplatform.v1.EvaluateDatasetRunOrBuilder> + evaluateDatasetRunsBuilder_; + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getEvaluateDatasetRunsList() { + if (evaluateDatasetRunsBuilder_ == null) { + return java.util.Collections.unmodifiableList(evaluateDatasetRuns_); + } else { + return evaluateDatasetRunsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getEvaluateDatasetRunsCount() { + if (evaluateDatasetRunsBuilder_ == null) { + return evaluateDatasetRuns_.size(); + } else { + return evaluateDatasetRunsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluateDatasetRun getEvaluateDatasetRuns(int index) { + if (evaluateDatasetRunsBuilder_ == null) { + return evaluateDatasetRuns_.get(index); + } else { + return evaluateDatasetRunsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEvaluateDatasetRuns( + int index, com.google.cloud.aiplatform.v1.EvaluateDatasetRun value) { + if (evaluateDatasetRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.set(index, value); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEvaluateDatasetRuns( + int index, com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder builderForValue) { + if (evaluateDatasetRunsBuilder_ == null) { + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.set(index, builderForValue.build()); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addEvaluateDatasetRuns(com.google.cloud.aiplatform.v1.EvaluateDatasetRun value) { + if (evaluateDatasetRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.add(value); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addEvaluateDatasetRuns( + int index, com.google.cloud.aiplatform.v1.EvaluateDatasetRun value) { + if (evaluateDatasetRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.add(index, value); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addEvaluateDatasetRuns( + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder builderForValue) { + if (evaluateDatasetRunsBuilder_ == null) { + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.add(builderForValue.build()); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addEvaluateDatasetRuns( + int index, com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder builderForValue) { + if (evaluateDatasetRunsBuilder_ == null) { + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.add(index, builderForValue.build()); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllEvaluateDatasetRuns( + java.lang.Iterable values) { + if (evaluateDatasetRunsBuilder_ == null) { + ensureEvaluateDatasetRunsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, evaluateDatasetRuns_); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEvaluateDatasetRuns() { + if (evaluateDatasetRunsBuilder_ == null) { + evaluateDatasetRuns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeEvaluateDatasetRuns(int index) { + if (evaluateDatasetRunsBuilder_ == null) { + ensureEvaluateDatasetRunsIsMutable(); + evaluateDatasetRuns_.remove(index); + onChanged(); + } else { + evaluateDatasetRunsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder getEvaluateDatasetRunsBuilder( + int index) { + return internalGetEvaluateDatasetRunsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluateDatasetRunOrBuilder + getEvaluateDatasetRunsOrBuilder(int index) { + if (evaluateDatasetRunsBuilder_ == null) { + return evaluateDatasetRuns_.get(index); + } else { + return evaluateDatasetRunsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getEvaluateDatasetRunsOrBuilderList() { + if (evaluateDatasetRunsBuilder_ != null) { + return evaluateDatasetRunsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(evaluateDatasetRuns_); + } + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder + addEvaluateDatasetRunsBuilder() { + return internalGetEvaluateDatasetRunsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.EvaluateDatasetRun.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder addEvaluateDatasetRunsBuilder( + int index) { + return internalGetEvaluateDatasetRunsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.EvaluateDatasetRun.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Evaluation runs for the Tuning Job.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getEvaluateDatasetRunsBuilderList() { + return internalGetEvaluateDatasetRunsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluateDatasetRun, + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder, + com.google.cloud.aiplatform.v1.EvaluateDatasetRunOrBuilder> + internalGetEvaluateDatasetRunsFieldBuilder() { + if (evaluateDatasetRunsBuilder_ == null) { + evaluateDatasetRunsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.aiplatform.v1.EvaluateDatasetRun, + com.google.cloud.aiplatform.v1.EvaluateDatasetRun.Builder, + com.google.cloud.aiplatform.v1.EvaluateDatasetRunOrBuilder>( + evaluateDatasetRuns_, + ((bitField0_ & 0x00040000) != 0), + getParentForChildren(), + isClean()); + evaluateDatasetRuns_ = null; + } + return evaluateDatasetRunsBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.TuningJob) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java index 5364f4c100fd..e7ef5c663bae 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java @@ -802,6 +802,73 @@ java.lang.String getLabelsOrDefault( */ com.google.protobuf.ByteString getServiceAccountBytes(); + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getEvaluateDatasetRunsList(); + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.EvaluateDatasetRun getEvaluateDatasetRuns(int index); + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getEvaluateDatasetRunsCount(); + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getEvaluateDatasetRunsOrBuilderList(); + + /** + * + * + *
+   * Output only. Evaluation runs for the Tuning Job.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EvaluateDatasetRun evaluate_dataset_runs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.EvaluateDatasetRunOrBuilder getEvaluateDatasetRunsOrBuilder( + int index); + com.google.cloud.aiplatform.v1.TuningJob.SourceModelCase getSourceModelCase(); com.google.cloud.aiplatform.v1.TuningJob.TuningSpecCase getTuningSpecCase(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java index 80183958a740..ccfb08123e55 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java @@ -80,6 +80,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_TunedModelRef_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_TunedModelRef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_EvaluationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_EvaluationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_TunedModelCheckpoint_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -102,15 +110,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\022\032google.cloud.aiplatform.v1\032\037googl" + "e/api/field_behavior.proto\032\031google/api/r" + "esource.proto\032(google/cloud/aiplatform/v1/content.proto\0320google/cloud/aiplatform" - + "/v1/encryption_spec.proto\032*google/cloud/" - + "aiplatform/v1/job_state.proto\032\037google/pr" - + "otobuf/timestamp.proto\032\027google/rpc/status.proto\"\215\t\n" + + "/v1/encryption_spec.proto\0323google/cloud/aiplatform/v1/evaluation_service.proto\032*" + + "google/cloud/aiplatform/v1/job_state.pro" + + "to\032\037google/protobuf/timestamp.proto\032\027google/rpc/status.proto\"\341\t\n" + "\tTuningJob\022\024\n\n" + "base_model\030\004 \001(\tH\000\022D\n" - + "\017pre_tuned_model\030\037" - + " \001(\0132).google.cloud.aiplatform.v1.PreTunedModelH\000\022R\n" - + "\026supervised_tuning_spec\030\005" - + " \001(\01320.google.cloud.aiplatform.v1.SupervisedTuningSpecH\001\022\024\n" + + "\017pre_tuned_model\030\037 \001(" + + "\0132).google.cloud.aiplatform.v1.PreTunedModelH\000\022R\n" + + "\026supervised_tuning_spec\030\005 \001(\01320" + + ".google.cloud.aiplatform.v1.SupervisedTuningSpecH\001\022\024\n" + "\004name\030\001 \001(\tB\006\340A\010\340A\003\022%\n" + "\030tuned_model_display_name\030\002 \001(\tB\003\340A\001\022\030\n" + "\013description\030\003 \001(\tB\003\340A\001\0228\n" @@ -122,23 +130,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013update_time\030\n" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022&\n" + "\005error\030\013 \001(\0132\022.google.rpc.StatusB\003\340A\003\022F\n" - + "\006labels\030\014" - + " \003(\01321.google.cloud.aiplatform.v1.TuningJob.LabelsEntryB\003\340A\001\022=\n\n" + + "\006labels\030\014 \003(\01321.google.cloud.a" + + "iplatform.v1.TuningJob.LabelsEntryB\003\340A\001\022=\n\n" + "experiment\030\r" + " \001(\tB)\340A\003\372A#\n" + "!aiplatform.googleapis.com/Context\022@\n" - + "\013tuned_model\030\016" - + " \001(\0132&.google.cloud.aiplatform.v1.TunedModelB\003\340A\003\022K\n" - + "\021tuning_data_stats\030\017" - + " \001(\0132+.google.cloud.aiplatform.v1.TuningDataStatsB\003\340A\003\022C\n" + + "\013tuned_model\030\016 " + + "\001(\0132&.google.cloud.aiplatform.v1.TunedModelB\003\340A\003\022K\n" + + "\021tuning_data_stats\030\017 \001(\0132+.go" + + "ogle.cloud.aiplatform.v1.TuningDataStatsB\003\340A\003\022C\n" + "\017encryption_spec\030\020" + " \001(\0132*.google.cloud.aiplatform.v1.EncryptionSpec\022\027\n" - + "\017service_account\030\026 \001(\t\032-\n" + + "\017service_account\030\026 \001(\t\022R\n" + + "\025evaluate_dataset_runs\030 " + + " \003(\0132..google.cloud.aiplatform.v1.EvaluateDatasetRunB\003\340A\003\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\200\001\352A}\n" - + "#aiplatform.googleapis.com/TuningJob\022?projects/{project}/loc" - + "ations/{location}/tuningJobs/{tuning_job}*\n" + + "#aiplatform.googleapis.com/TuningJob\022?proje" + + "cts/{project}/locations/{location}/tuningJobs/{tuning_job}*\n" + "tuningJobs2\ttuningJobB\016\n" + "\014source_modelB\r\n" + "\013tuning_spec\"\316\001\n\n" @@ -147,8 +157,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037aiplatform.googleapis.com/Model\022<\n" + "\010endpoint\030\002 \001(\tB*\340A\003\372A$\n" + "\"aiplatform.googleapis.com/Endpoint\022J\n" - + "\013checkpoints\030\003" - + " \003(\01320.google.cloud.aiplatform.v1.TunedModelCheckpointB\003\340A\003\"\362\002\n" + + "\013checkpoints\030\003 \003(\01320.google.clou" + + "d.aiplatform.v1.TunedModelCheckpointB\003\340A\003\"\362\002\n" + "#SupervisedTuningDatasetDistribution\022\020\n" + "\003sum\030\001 \001(\003B\003\340A\003\022\031\n" + "\014billable_sum\030\t \001(\003B\003\340A\003\022\020\n" @@ -158,8 +168,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006median\030\005 \001(\001B\003\340A\003\022\017\n" + "\002p5\030\006 \001(\001B\003\340A\003\022\020\n" + "\003p95\030\007 \001(\001B\003\340A\003\022c\n" - + "\007buckets\030\010 \003(\0132M.google.cloud.aiplatform.v1.SupervisedTun" - + "ingDatasetDistribution.DatasetBucketB\003\340A\003\032J\n\r" + + "\007buckets\030\010 \003(\0132M.google.cloud.aiplatform" + + ".v1.SupervisedTuningDatasetDistribution.DatasetBucketB\003\340A\003\032J\n\r" + "DatasetBucket\022\022\n" + "\005count\030\001 \001(\001B\003\340A\003\022\021\n" + "\004left\030\002 \001(\001B\003\340A\003\022\022\n" @@ -170,27 +180,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036total_billable_character_count\030\003 \001(\003B\005\030\001\340A\003\022\'\n" + "\032total_billable_token_count\030\t \001(\003B\003\340A\003\022\036\n" + "\021tuning_step_count\030\004 \001(\003B\003\340A\003\022k\n" - + "\035user_input_token_distribution\030\005 \001(\0132?.googl" - + "e.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022l\n" - + "\036user_output_token_distribution\030\006 \001(\0132?.google.cloud.ai" - + "platform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022s\n" - + "%user_message_per_example_distribution\030\007 \001(\0132?.google.cloud.aipla" - + "tform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022G\n" - + "\025user_dataset_examples\030\010 \003(\013" - + "2#.google.cloud.aiplatform.v1.ContentB\003\340A\003\022*\n" + + "\035user_input_token_distribution\030\005 \001(\0132?.google.cloud.aiplatform.v1.S" + + "upervisedTuningDatasetDistributionB\003\340A\003\022l\n" + + "\036user_output_token_distribution\030\006 \001(\0132" + + "?.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022s\n" + + "%user_message_per_example_distribution\030\007 \001(\0132?.g" + + "oogle.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\003\340A\003\022G\n" + + "\025user_dataset_examples\030\010" + + " \003(\0132#.google.cloud.aiplatform.v1.ContentB\003\340A\003\022*\n" + "\035total_truncated_example_count\030\n" + " \001(\003B\003\340A\003\022&\n" + "\031truncated_example_indices\030\013 \003(\003B\003\340A\003\022$\n" + "\027dropped_example_reasons\030\014 \003(\tB\003\340A\003\"\205\001\n" + "\017TuningDataStats\022]\n" - + "\034supervised_tuning_data_stats\030\001 \001(\01325.google.cloud.ai" - + "platform.v1.SupervisedTuningDataStatsH\000B\023\n" + + "\034supervised_tuning_data_stats\030\001 \001(\0132" + + "5.google.cloud.aiplatform.v1.SupervisedTuningDataStatsH\000B\023\n" + "\021tuning_data_stats\"\372\002\n" + "\031SupervisedHyperParameters\022\030\n" + "\013epoch_count\030\001 \001(\003B\003\340A\001\022%\n" + "\030learning_rate_multiplier\030\002 \001(\001B\003\340A\001\022\\\n" - + "\014adapter_size\030\003 \001(\0162A.google.cloud.aiplatf" - + "orm.v1.SupervisedHyperParameters.AdapterSizeB\003\340A\001\"\275\001\n" + + "\014adapter_size\030\003 \001(\0162A.goo" + + "gle.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSizeB\003\340A\001\"\275\001\n" + "\013AdapterSize\022\034\n" + "\030ADAPTER_SIZE_UNSPECIFIED\020\000\022\024\n" + "\020ADAPTER_SIZE_ONE\020\001\022\024\n" @@ -198,13 +208,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021ADAPTER_SIZE_FOUR\020\002\022\026\n" + "\022ADAPTER_SIZE_EIGHT\020\003\022\030\n" + "\024ADAPTER_SIZE_SIXTEEN\020\004\022\033\n" - + "\027ADAPTER_SIZE_THIRTY_TWO\020\005\"\336\001\n" + + "\027ADAPTER_SIZE_THIRTY_TWO\020\005\"\254\002\n" + "\024SupervisedTuningSpec\022!\n" + "\024training_dataset_uri\030\001 \001(\tB\003\340A\002\022#\n" + "\026validation_dataset_uri\030\002 \001(\tB\003\340A\001\022T\n" - + "\020hyper_parameters\030\003" - + " \001(\01325.google.cloud.aiplatform.v1.SupervisedHyperParametersB\003\340A\001\022(\n" - + "\033export_last_checkpoint_only\030\006 \001(\010B\003\340A\001\"\343\001\n\r" + + "\020hyper_parameters\030\003 \001(\01325.google.cloud.aip" + + "latform.v1.SupervisedHyperParametersB\003\340A\001\022(\n" + + "\033export_last_checkpoint_only\030\006 \001(\010B\003\340A\001\022L\n" + + "\021evaluation_config\030\005 \001(\0132,.google." + + "cloud.aiplatform.v1.EvaluationConfigB\003\340A\001\"\343\001\n\r" + "TunedModelRef\022;\n" + "\013tuned_model\030\001 \001(\tB$\372A!\n" + "\037aiplatform.googleapis.com/ModelH\000\022>\n\n" @@ -212,7 +224,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "#aiplatform.googleapis.com/TuningJobH\000\022B\n" + "\014pipeline_job\030\003 \001(\tB*\372A\'\n" + "%aiplatform.googleapis.com/PipelineJobH\000B\021\n" - + "\017tuned_model_ref\"\\\n" + + "\017tuned_model_ref\"\266\002\n" + + "\020EvaluationConfig\0228\n" + + "\007metrics\030\001" + + " \003(\0132\".google.cloud.aiplatform.v1.MetricB\003\340A\002\022D\n\r" + + "output_config\030\002" + + " \001(\0132(.google.cloud.aiplatform.v1.OutputConfigB\003\340A\002\022J\n" + + "\020autorater_config\030\003" + + " \001(\0132+.google.cloud.aiplatform.v1.AutoraterConfigB\003\340A\001\022V\n" + + "\033inference_generation_config\030\005" + + " \001(\0132,.google.cloud.aiplatform.v1.GenerationConfigB\003\340A\001\"\361\001\n" + + "\022EvaluateDatasetRun\022\035\n" + + "\016operation_name\030\001 \001(\tB\005\030\001\340A\003\022\033\n" + + "\016evaluation_run\030\005 \001(\tB\003\340A\003\022\032\n\r" + + "checkpoint_id\030\002 \001(\tB\003\340A\003\022[\n" + + "\031evaluate_dataset_response\030\003" + + " \001(\01323.google.cloud.aiplatform.v1.EvaluateDatasetResponseB\003\340A\003\022&\n" + + "\005error\030\004 \001(\0132\022.google.rpc.StatusB\003\340A\003\"\\\n" + "\024TunedModelCheckpoint\022\025\n\r" + "checkpoint_id\030\001 \001(\t\022\r\n" + "\005epoch\030\002 \001(\003\022\014\n" @@ -223,10 +251,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037aiplatform.googleapis.com/Model\022\032\n\r" + "checkpoint_id\030\002 \001(\tB\003\340A\001\022\027\n\n" + "base_model\030\003 \001(\tB\003\340A\003B\314\001\n" - + "\036com.google.cloud.aiplatform.v1B\016TuningJobProtoP\001Z>cloud.google.com/go/" - + "aiplatform/apiv1/aiplatformpb;aiplatform" - + "pb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google" - + "\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" + + "\036com.google.cloud.aiplatform.v1B\016TuningJobProtoP\001Z>cloud.go" + + "ogle.com/go/aiplatform/apiv1/aiplatformp" + + "b;aiplatformpb\252\002\032Google.Cloud.AIPlatform" + + ".V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Googl" + + "e::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -236,6 +265,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.aiplatform.v1.ContentProto.getDescriptor(), com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EvaluationServiceProto.getDescriptor(), com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), @@ -264,6 +294,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TuningDataStats", "EncryptionSpec", "ServiceAccount", + "EvaluateDatasetRuns", "SourceModel", "TuningSpec", }); @@ -345,6 +376,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ValidationDatasetUri", "HyperParameters", "ExportLastCheckpointOnly", + "EvaluationConfig", }); internal_static_google_cloud_aiplatform_v1_TunedModelRef_descriptor = getDescriptor().getMessageType(7); @@ -354,8 +386,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TunedModel", "TuningJob", "PipelineJob", "TunedModelRef", }); - internal_static_google_cloud_aiplatform_v1_TunedModelCheckpoint_descriptor = + internal_static_google_cloud_aiplatform_v1_EvaluationConfig_descriptor = getDescriptor().getMessageType(8); + internal_static_google_cloud_aiplatform_v1_EvaluationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_EvaluationConfig_descriptor, + new java.lang.String[] { + "Metrics", "OutputConfig", "AutoraterConfig", "InferenceGenerationConfig", + }); + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_EvaluateDatasetRun_descriptor, + new java.lang.String[] { + "OperationName", "EvaluationRun", "CheckpointId", "EvaluateDatasetResponse", "Error", + }); + internal_static_google_cloud_aiplatform_v1_TunedModelCheckpoint_descriptor = + getDescriptor().getMessageType(10); internal_static_google_cloud_aiplatform_v1_TunedModelCheckpoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_TunedModelCheckpoint_descriptor, @@ -363,7 +411,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CheckpointId", "Epoch", "Step", "Endpoint", }); internal_static_google_cloud_aiplatform_v1_PreTunedModel_descriptor = - getDescriptor().getMessageType(9); + getDescriptor().getMessageType(11); internal_static_google_cloud_aiplatform_v1_PreTunedModel_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PreTunedModel_descriptor, @@ -375,6 +423,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.aiplatform.v1.ContentProto.getDescriptor(); com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EvaluationServiceProto.getDescriptor(); com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/evaluation_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/evaluation_service.proto index 650c9f53450b..8f92a3065862 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/evaluation_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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. @@ -20,6 +20,10 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/content.proto"; +import "google/cloud/aiplatform/v1/io.proto"; +import "google/protobuf/struct.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; @@ -158,6 +162,109 @@ message EvaluateInstancesRequest { ]; } +// The metric used for running evaluations. +message Metric { + // The per-metric statistics on evaluation results supported by + // `EvaluationService.EvaluateDataset`. + enum AggregationMetric { + // Unspecified aggregation metric. + AGGREGATION_METRIC_UNSPECIFIED = 0; + + // Average aggregation metric. Not supported for Pairwise metric. + AVERAGE = 1; + + // Mode aggregation metric. + MODE = 2; + + // Standard deviation aggregation metric. Not supported for pairwise metric. + STANDARD_DEVIATION = 3; + + // Variance aggregation metric. Not supported for pairwise metric. + VARIANCE = 4; + + // Minimum aggregation metric. Not supported for pairwise metric. + MINIMUM = 5; + + // Maximum aggregation metric. Not supported for pairwise metric. + MAXIMUM = 6; + + // Median aggregation metric. Not supported for pairwise metric. + MEDIAN = 7; + + // 90th percentile aggregation metric. Not supported for pairwise metric. + PERCENTILE_P90 = 8; + + // 95th percentile aggregation metric. Not supported for pairwise metric. + PERCENTILE_P95 = 9; + + // 99th percentile aggregation metric. Not supported for pairwise metric. + PERCENTILE_P99 = 10; + } + + // The spec for the metric. + // It would be either a pre-defined metric, or a inline metric spec. + oneof metric_spec { + // The spec for a pre-defined metric. + PredefinedMetricSpec predefined_metric_spec = 8; + + // Spec for a computation based metric. + ComputationBasedMetricSpec computation_based_metric_spec = 9; + + // Spec for an LLM based metric. + LLMBasedMetricSpec llm_based_metric_spec = 10; + + // Spec for pointwise metric. + PointwiseMetricSpec pointwise_metric_spec = 2; + + // Spec for pairwise metric. + PairwiseMetricSpec pairwise_metric_spec = 3; + + // Spec for exact match metric. + ExactMatchSpec exact_match_spec = 4; + + // Spec for bleu metric. + BleuSpec bleu_spec = 5; + + // Spec for rouge metric. + RougeSpec rouge_spec = 6; + } + + // Optional. The aggregation metrics to use. + repeated AggregationMetric aggregation_metrics = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The configs for autorater. This is applicable to both EvaluateInstances and +// EvaluateDataset. +message AutoraterConfig { + // Optional. Number of samples for each instance in the dataset. + // If not specified, the default is 4. Minimum value is 1, maximum value + // is 32. + optional int32 sampling_count = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Default is true. Whether to flip the candidate and baseline + // responses. This is only applicable to the pairwise metric. If enabled, also + // provide PairwiseMetricSpec.candidate_response_field_name and + // PairwiseMetricSpec.baseline_response_field_name. When rendering + // PairwiseMetricSpec.metric_prompt_template, the candidate and baseline + // fields will be flipped for half of the samples to reduce bias. + optional bool flip_enabled = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The fully qualified name of the publisher model or tuned + // autorater endpoint to use. + // + // Publisher model format: + // `projects/{project}/locations/{location}/publishers/*/models/*` + // + // Tuned model endpoint format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string autorater_model = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration options for model generation and outputs. + GenerationConfig generation_config = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + // Response message for EvaluationService.EvaluateInstances. message EvaluateInstancesResponse { // Evaluation results will be served in the same order as presented in @@ -250,6 +357,168 @@ message EvaluateInstancesResponse { // Result for Metricx metric. MetricxResult metricx_result = 30; } + + // Metric results for each instance. + // The order of the metric results is guaranteed to be the same as the order + // of the instances in the request. + repeated MetricResult metric_results = 43; +} + +// Result for a single metric on a single instance. +message MetricResult { + // Output only. The score for the metric. + // Please refer to each metric's documentation for the meaning of the score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The explanation for the metric result. + optional string explanation = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error status for the metric result. + optional google.rpc.Status error = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Config for evaluation output. +message OutputConfig { + // The destination for evaluation output. + oneof destination { + // Cloud storage destination for evaluation output. + GcsDestination gcs_destination = 1; + } +} + +// The dataset used for evaluation. +message EvaluationDataset { + // The source of the dataset. + oneof source { + // Cloud storage source holds the dataset. Currently only one Cloud Storage + // file path is supported. + GcsSource gcs_source = 1; + + // BigQuery source holds the dataset. + BigQuerySource bigquery_source = 2; + } +} + +// The results from an evaluation run performed by the EvaluationService. +message EvaluateDatasetResponse { + // Output only. Aggregation statistics derived from results of + // EvaluationService. + AggregationOutput aggregation_output = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Output info for EvaluationService. + OutputInfo output_info = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Describes the info for output of EvaluationService. +message OutputInfo { + // The output location into which evaluation output is written. + oneof output_location { + // Output only. The full path of the Cloud Storage directory created, into + // which the evaluation results and aggregation results are written. + string gcs_output_directory = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// The aggregation result for the entire dataset and all metrics. +message AggregationOutput { + // The dataset used for evaluation & aggregation. + EvaluationDataset dataset = 1; + + // One AggregationResult per metric. + repeated AggregationResult aggregation_results = 2; +} + +// The aggregation result for a single metric. +message AggregationResult { + // The aggregation result. + oneof aggregation_result { + // Result for pointwise metric. + PointwiseMetricResult pointwise_metric_result = 5; + + // Result for pairwise metric. + PairwiseMetricResult pairwise_metric_result = 6; + + // Results for exact match metric. + ExactMatchMetricValue exact_match_metric_value = 7; + + // Results for bleu metric. + BleuMetricValue bleu_metric_value = 8; + + // Results for rouge metric. + RougeMetricValue rouge_metric_value = 9; + } + + // Aggregation metric. + Metric.AggregationMetric aggregation_metric = 4; +} + +// The spec for a pre-defined metric. +message PredefinedMetricSpec { + // Required. The name of a pre-defined metric, such as + // "instruction_following_v1" or "text_quality_v1". + string metric_spec_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The parameters needed to run the pre-defined metric. + google.protobuf.Struct metric_spec_parameters = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Specification for a computation based metric. +message ComputationBasedMetricSpec { + // Types of computation based metrics. + enum ComputationBasedMetricType { + // Unspecified computation based metric type. + COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED = 0; + + // Exact match metric. + EXACT_MATCH = 1; + + // BLEU metric. + BLEU = 2; + + // ROUGE metric. + ROUGE = 3; + } + + // Required. The type of the computation based metric. + optional ComputationBasedMetricType type = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A map of parameters for the metric, e.g. {"rouge_type": + // "rougeL"}. + optional google.protobuf.Struct parameters = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Specification for an LLM based metric. +message LLMBasedMetricSpec { + // Source of the rubrics to be used for evaluation. + oneof rubrics_source { + // Use a pre-defined group of rubrics associated with the input. + // Refers to a key in the rubric_groups map of EvaluationInstance. + string rubric_group_key = 4; + + // Dynamically generate rubrics using a predefined spec. + PredefinedMetricSpec predefined_rubric_generation_spec = 6; + } + + // Required. Template for the prompt sent to the judge model. + optional string metric_prompt_template = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. System instructions for the judge model. + optional string system_instruction = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional configuration for the judge LLM (Autorater). + optional AutoraterConfig judge_autorater_config = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional additional configuration for the metric. + optional google.protobuf.Struct additional_config = 7 + [(google.api.field_behavior) = OPTIONAL]; } // Input for exact match metric. @@ -1002,6 +1271,11 @@ message PointwiseMetricInstance { // in the json_instance to render // PointwiseMetricSpec.instance_prompt_template. string json_instance = 1; + + // Key-value contents for the mutlimodality input, including text, image, + // video, audio, and pdf, etc. The key is placeholder in metric prompt + // template, and the value is the multimodal content. + ContentMap content_map_instance = 2; } } @@ -1010,6 +1284,29 @@ message PointwiseMetricSpec { // Required. Metric prompt template for pointwise metric. optional string metric_prompt_template = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. System instructions for pointwise metric. + optional string system_instruction = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. CustomOutputFormatConfig allows customization of metric output. + // By default, metrics return a score and explanation. + // When this config is set, the default output is replaced with either: + // - The raw output string. + // - A parsed output based on a user-defined schema. + // If a custom format is chosen, the `score` and `explanation` fields in the + // corresponding metric result will be empty. + CustomOutputFormatConfig custom_output_format_config = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for custom output format configuration. +message CustomOutputFormatConfig { + // Custom output format configuration. + oneof custom_output_format_config { + // Optional. Whether to return raw output. + bool return_raw_output = 1 [(google.api.field_behavior) = OPTIONAL]; + } } // Spec for pointwise metric result. @@ -1019,6 +1316,24 @@ message PointwiseMetricResult { // Output only. Explanation for pointwise metric score. string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Spec for custom output. + CustomOutput custom_output = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Spec for custom output. +message CustomOutput { + // Custom output. + oneof custom_output { + // Output only. List of raw output strings. + RawOutput raw_outputs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Raw output. +message RawOutput { + // Output only. Raw output string. + repeated string raw_output = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Input for pairwise metric. @@ -1039,6 +1354,11 @@ message PairwiseMetricInstance { // in the json_instance to render // PairwiseMetricSpec.instance_prompt_template. string json_instance = 1; + + // Key-value contents for the mutlimodality input, including text, image, + // video, audio, and pdf, etc. The key is placeholder in metric prompt + // template, and the value is the multimodal content. + ContentMap content_map_instance = 2; } } @@ -1047,6 +1367,26 @@ message PairwiseMetricSpec { // Required. Metric prompt template for pairwise metric. optional string metric_prompt_template = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The field name of the candidate response. + string candidate_response_field_name = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The field name of the baseline response. + string baseline_response_field_name = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. System instructions for pairwise metric. + optional string system_instruction = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. CustomOutputFormatConfig allows customization of metric output. + // When this config is set, the default output is replaced with + // the raw output string. + // If a custom format is chosen, the `pairwise_choice` and `explanation` + // fields in the corresponding metric result will be empty. + CustomOutputFormatConfig custom_output_format_config = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Spec for pairwise metric result. @@ -1057,6 +1397,9 @@ message PairwiseMetricResult { // Output only. Explanation for pairwise metric score. string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Spec for custom output. + CustomOutput custom_output = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Input for tool call valid metric. @@ -1315,3 +1658,15 @@ message MetricxResult { // Output only. MetricX score. Range depends on version. optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Map of placeholder in metric prompt template to contents of model input. +message ContentMap { + // Repeated Content type. + message Contents { + // Optional. Repeated contents. + repeated Content contents = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Map of placeholder to contents. + map values = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto index 93134c5ec03b..adb12ab44b1d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.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. @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/aiplatform/v1/content.proto"; import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/evaluation_service.proto"; import "google/cloud/aiplatform/v1/job_state.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -147,6 +148,10 @@ message TuningJob { // Users starting the pipeline must have the `iam.serviceAccounts.actAs` // permission on this service account. string service_account = 22; + + // Output only. Evaluation runs for the Tuning Job. + repeated EvaluateDatasetRun evaluate_dataset_runs = 32 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The Model Registry Model and Online Prediction Endpoint associated with @@ -350,6 +355,10 @@ message SupervisedTuningSpec { // the last checkpoint will be exported. Otherwise, enable intermediate // checkpoints for SFT. Default is false. bool export_last_checkpoint_only = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Evaluation Config for Tuning Job. + EvaluationConfig evaluation_config = 5 + [(google.api.field_behavior) = OPTIONAL]; } // TunedModel Reference for legacy model migration. @@ -375,6 +384,46 @@ message TunedModelRef { } } +// Evaluation Config for Tuning Job. +message EvaluationConfig { + // Required. The metrics used for evaluation. + repeated Metric metrics = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Config for evaluation output. + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Autorater config for evaluation. + AutoraterConfig autorater_config = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration options for inference generation and outputs. + // If not set, default generation parameters are used. + GenerationConfig inference_generation_config = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Evaluate Dataset Run Result for Tuning Job. +message EvaluateDatasetRun { + // Output only. Deprecated: The updated architecture uses evaluation_run + // instead. + string operation_name = 1 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the evaluation run. Format: + // `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`. + string evaluation_run = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The checkpoint id used in the evaluation run. Only populated + // when evaluating checkpoints. + string checkpoint_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Results for EvaluationService. + EvaluateDatasetResponse evaluate_dataset_response = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error of the evaluation run if any. + google.rpc.Status error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // TunedModelCheckpoint for the Tuned Model of a Tuning Job. message TunedModelCheckpoint { // The ID of the checkpoint. diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceClient.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceClient.java index b54a09ae0c0b..20d2098426d8 100644 --- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceClient.java +++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceClient.java @@ -1009,6 +1009,26 @@ * * * + *

GenerateAppResource + *

Generates specific resources (e.g. agent) in the app using LLM assistant. + * + *

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

+ *
    + *
  • generateAppResourceAsync(GenerateAppResourceRequest request) + *

+ *

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

+ *
    + *
  • generateAppResourceAsync(AppName parent) + *

  • generateAppResourceAsync(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.

+ *
    + *
  • generateAppResourceOperationCallable() + *

  • generateAppResourceCallable() + *

+ * + * + * *

ListChangelogs *

Lists the changelogs of the specified app. * @@ -7814,6 +7834,201 @@ public final UnaryCallable restoreAppVersio return stub.restoreAppVersionCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates specific resources (e.g. agent) in the app using LLM 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
+   *   AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
+   *   GenerateAppResourceResponse response =
+   *       agentServiceClient.generateAppResourceAsync(parent).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the app to generate the resource for. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + generateAppResourceAsync(AppName parent) { + GenerateAppResourceRequest request = + GenerateAppResourceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return generateAppResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates specific resources (e.g. agent) in the app using LLM 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
+   *   String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
+   *   GenerateAppResourceResponse response =
+   *       agentServiceClient.generateAppResourceAsync(parent).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the app to generate the resource for. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + generateAppResourceAsync(String parent) { + GenerateAppResourceRequest request = + GenerateAppResourceRequest.newBuilder().setParent(parent).build(); + return generateAppResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates specific resources (e.g. agent) in the app using LLM 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
+   *   GenerateAppResourceRequest request =
+   *       GenerateAppResourceRequest.newBuilder()
+   *           .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+   *           .addAllRefineInstructions(
+   *               new ArrayList())
+   *           .setToolGenerationConfig(
+   *               GenerateAppResourceRequest.ToolGenerationConfig.newBuilder().build())
+   *           .setAppGenerationConfig(
+   *               GenerateAppResourceRequest.AppGenerationConfig.newBuilder().build())
+   *           .setEvaluationGenerationConfig(
+   *               GenerateAppResourceRequest.EvaluationGenerationConfig.newBuilder().build())
+   *           .setEvaluationPersonasGenerationConfig(
+   *               GenerateAppResourceRequest.EvaluationPersonasGenerationConfig.newBuilder()
+   *                   .build())
+   *           .setQualityReportGenerationConfig(
+   *               GenerateAppResourceRequest.QualityReportGenerationConfig.newBuilder().build())
+   *           .setHillClimbingFixConfig(
+   *               GenerateAppResourceRequest.HillClimbingFixConfig.newBuilder().build())
+   *           .build();
+   *   GenerateAppResourceResponse response =
+   *       agentServiceClient.generateAppResourceAsync(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 + generateAppResourceAsync(GenerateAppResourceRequest request) { + return generateAppResourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates specific resources (e.g. agent) in the app using LLM 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
+   *   GenerateAppResourceRequest request =
+   *       GenerateAppResourceRequest.newBuilder()
+   *           .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+   *           .addAllRefineInstructions(
+   *               new ArrayList())
+   *           .setToolGenerationConfig(
+   *               GenerateAppResourceRequest.ToolGenerationConfig.newBuilder().build())
+   *           .setAppGenerationConfig(
+   *               GenerateAppResourceRequest.AppGenerationConfig.newBuilder().build())
+   *           .setEvaluationGenerationConfig(
+   *               GenerateAppResourceRequest.EvaluationGenerationConfig.newBuilder().build())
+   *           .setEvaluationPersonasGenerationConfig(
+   *               GenerateAppResourceRequest.EvaluationPersonasGenerationConfig.newBuilder()
+   *                   .build())
+   *           .setQualityReportGenerationConfig(
+   *               GenerateAppResourceRequest.QualityReportGenerationConfig.newBuilder().build())
+   *           .setHillClimbingFixConfig(
+   *               GenerateAppResourceRequest.HillClimbingFixConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       agentServiceClient.generateAppResourceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateAppResourceResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationCallable() { + return stub.generateAppResourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates specific resources (e.g. agent) in the app using LLM 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
+   *   GenerateAppResourceRequest request =
+   *       GenerateAppResourceRequest.newBuilder()
+   *           .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+   *           .addAllRefineInstructions(
+   *               new ArrayList())
+   *           .setToolGenerationConfig(
+   *               GenerateAppResourceRequest.ToolGenerationConfig.newBuilder().build())
+   *           .setAppGenerationConfig(
+   *               GenerateAppResourceRequest.AppGenerationConfig.newBuilder().build())
+   *           .setEvaluationGenerationConfig(
+   *               GenerateAppResourceRequest.EvaluationGenerationConfig.newBuilder().build())
+   *           .setEvaluationPersonasGenerationConfig(
+   *               GenerateAppResourceRequest.EvaluationPersonasGenerationConfig.newBuilder()
+   *                   .build())
+   *           .setQualityReportGenerationConfig(
+   *               GenerateAppResourceRequest.QualityReportGenerationConfig.newBuilder().build())
+   *           .setHillClimbingFixConfig(
+   *               GenerateAppResourceRequest.HillClimbingFixConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       agentServiceClient.generateAppResourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable generateAppResourceCallable() { + return stub.generateAppResourceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists the changelogs of the specified app. diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceSettings.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceSettings.java index 2fc60387cdf4..f51e545b6c68 100644 --- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceSettings.java +++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceSettings.java @@ -425,6 +425,20 @@ public UnaryCallSettings restoreAppVersionS return ((AgentServiceStubSettings) getStubSettings()).restoreAppVersionOperationSettings(); } + /** Returns the object with the settings used for calls to generateAppResource. */ + public UnaryCallSettings generateAppResourceSettings() { + return ((AgentServiceStubSettings) getStubSettings()).generateAppResourceSettings(); + } + + /** Returns the object with the settings used for calls to generateAppResource. */ + public OperationCallSettings< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationSettings() { + return ((AgentServiceStubSettings) getStubSettings()).generateAppResourceOperationSettings(); + } + /** Returns the object with the settings used for calls to listChangelogs. */ public PagedCallSettings< ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse> @@ -862,6 +876,21 @@ public UnaryCallSettings.Builder deleteAppVersio return getStubSettingsBuilder().restoreAppVersionOperationSettings(); } + /** Returns the builder for the settings used for calls to generateAppResource. */ + public UnaryCallSettings.Builder + generateAppResourceSettings() { + return getStubSettingsBuilder().generateAppResourceSettings(); + } + + /** Returns the builder for the settings used for calls to generateAppResource. */ + public OperationCallSettings.Builder< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationSettings() { + return getStubSettingsBuilder().generateAppResourceOperationSettings(); + } + /** Returns the builder for the settings used for calls to listChangelogs. */ public PagedCallSettings.Builder< ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse> diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/gapic_metadata.json b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/gapic_metadata.json index c603439aef68..472878611640 100644 --- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/gapic_metadata.json +++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/gapic_metadata.json @@ -67,6 +67,9 @@ "ExportApp": { "methods": ["exportAppAsync", "exportAppAsync", "exportAppAsync", "exportAppOperationCallable", "exportAppCallable"] }, + "GenerateAppResource": { + "methods": ["generateAppResourceAsync", "generateAppResourceAsync", "generateAppResourceAsync", "generateAppResourceOperationCallable", "generateAppResourceCallable"] + }, "GetAgent": { "methods": ["getAgent", "getAgent", "getAgent", "getAgentCallable"] }, diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStub.java index a60619b70ae9..0a612fcb1a86 100644 --- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStub.java +++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStub.java @@ -60,6 +60,9 @@ import com.google.cloud.ces.v1beta.Example; import com.google.cloud.ces.v1beta.ExportAppRequest; import com.google.cloud.ces.v1beta.ExportAppResponse; +import com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata; +import com.google.cloud.ces.v1beta.GenerateAppResourceRequest; +import com.google.cloud.ces.v1beta.GenerateAppResourceResponse; import com.google.cloud.ces.v1beta.GetAgentRequest; import com.google.cloud.ces.v1beta.GetAppRequest; import com.google.cloud.ces.v1beta.GetAppVersionRequest; @@ -402,6 +405,19 @@ public UnaryCallable restoreAppVersionCalla throw new UnsupportedOperationException("Not implemented: restoreAppVersionCallable()"); } + public OperationCallable< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: generateAppResourceOperationCallable()"); + } + + public UnaryCallable generateAppResourceCallable() { + throw new UnsupportedOperationException("Not implemented: generateAppResourceCallable()"); + } + public UnaryCallable listChangelogsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listChangelogsPagedCallable()"); diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStubSettings.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStubSettings.java index f03e53f7e337..9b4ce4f8312a 100644 --- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStubSettings.java +++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStubSettings.java @@ -87,6 +87,9 @@ import com.google.cloud.ces.v1beta.Example; import com.google.cloud.ces.v1beta.ExportAppRequest; import com.google.cloud.ces.v1beta.ExportAppResponse; +import com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata; +import com.google.cloud.ces.v1beta.GenerateAppResourceRequest; +import com.google.cloud.ces.v1beta.GenerateAppResourceResponse; import com.google.cloud.ces.v1beta.GetAgentRequest; import com.google.cloud.ces.v1beta.GetAppRequest; import com.google.cloud.ces.v1beta.GetAppVersionRequest; @@ -317,6 +320,13 @@ public class AgentServiceStubSettings extends StubSettings restoreAppVersionOperationSettings; + private final UnaryCallSettings + generateAppResourceSettings; + private final OperationCallSettings< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationSettings; private final PagedCallSettings< ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse> listChangelogsSettings; @@ -1196,6 +1206,20 @@ public UnaryCallSettings restoreAppVersionS return restoreAppVersionOperationSettings; } + /** Returns the object with the settings used for calls to generateAppResource. */ + public UnaryCallSettings generateAppResourceSettings() { + return generateAppResourceSettings; + } + + /** Returns the object with the settings used for calls to generateAppResource. */ + public OperationCallSettings< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationSettings() { + return generateAppResourceOperationSettings; + } + /** Returns the object with the settings used for calls to listChangelogs. */ public PagedCallSettings< ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse> @@ -1386,6 +1410,9 @@ protected AgentServiceStubSettings(Builder settingsBuilder) throws IOException { restoreAppVersionSettings = settingsBuilder.restoreAppVersionSettings().build(); restoreAppVersionOperationSettings = settingsBuilder.restoreAppVersionOperationSettings().build(); + generateAppResourceSettings = settingsBuilder.generateAppResourceSettings().build(); + generateAppResourceOperationSettings = + settingsBuilder.generateAppResourceOperationSettings().build(); listChangelogsSettings = settingsBuilder.listChangelogsSettings().build(); getChangelogSettings = settingsBuilder.getChangelogSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); @@ -1499,6 +1526,13 @@ public static class Builder extends StubSettings.Builder restoreAppVersionOperationSettings; + private final UnaryCallSettings.Builder + generateAppResourceSettings; + private final OperationCallSettings.Builder< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationSettings; private final PagedCallSettings.Builder< ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse> listChangelogsSettings; @@ -1601,6 +1635,8 @@ protected Builder(ClientContext clientContext) { deleteAppVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); restoreAppVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); restoreAppVersionOperationSettings = OperationCallSettings.newBuilder(); + generateAppResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + generateAppResourceOperationSettings = OperationCallSettings.newBuilder(); listChangelogsSettings = PagedCallSettings.newBuilder(LIST_CHANGELOGS_PAGE_STR_FACT); getChangelogSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); @@ -1656,6 +1692,7 @@ protected Builder(ClientContext clientContext) { createAppVersionSettings, deleteAppVersionSettings, restoreAppVersionSettings, + generateAppResourceSettings, listChangelogsSettings, getChangelogSettings, listLocationsSettings, @@ -1721,6 +1758,9 @@ protected Builder(AgentServiceStubSettings settings) { deleteAppVersionSettings = settings.deleteAppVersionSettings.toBuilder(); restoreAppVersionSettings = settings.restoreAppVersionSettings.toBuilder(); restoreAppVersionOperationSettings = settings.restoreAppVersionOperationSettings.toBuilder(); + generateAppResourceSettings = settings.generateAppResourceSettings.toBuilder(); + generateAppResourceOperationSettings = + settings.generateAppResourceOperationSettings.toBuilder(); listChangelogsSettings = settings.listChangelogsSettings.toBuilder(); getChangelogSettings = settings.getChangelogSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); @@ -1776,6 +1816,7 @@ protected Builder(AgentServiceStubSettings settings) { createAppVersionSettings, deleteAppVersionSettings, restoreAppVersionSettings, + generateAppResourceSettings, listChangelogsSettings, getChangelogSettings, listLocationsSettings, @@ -2047,6 +2088,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 + .generateAppResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .listChangelogsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -2208,6 +2254,32 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); + builder + .generateAppResourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + GenerateAppResourceResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + GenerateAppResourceOperationMetadata.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; } @@ -2528,6 +2600,21 @@ public UnaryCallSettings.Builder deleteAppVersio return restoreAppVersionOperationSettings; } + /** Returns the builder for the settings used for calls to generateAppResource. */ + public UnaryCallSettings.Builder + generateAppResourceSettings() { + return generateAppResourceSettings; + } + + /** Returns the builder for the settings used for calls to generateAppResource. */ + public OperationCallSettings.Builder< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationSettings() { + return generateAppResourceOperationSettings; + } + /** Returns the builder for the settings used for calls to listChangelogs. */ public PagedCallSettings.Builder< ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse> diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAgentServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAgentServiceStub.java index 43642a27c935..6fd2715a8d4c 100644 --- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAgentServiceStub.java +++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAgentServiceStub.java @@ -65,6 +65,9 @@ import com.google.cloud.ces.v1beta.Example; import com.google.cloud.ces.v1beta.ExportAppRequest; import com.google.cloud.ces.v1beta.ExportAppResponse; +import com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata; +import com.google.cloud.ces.v1beta.GenerateAppResourceRequest; +import com.google.cloud.ces.v1beta.GenerateAppResourceResponse; import com.google.cloud.ces.v1beta.GetAgentRequest; import com.google.cloud.ces.v1beta.GetAppRequest; import com.google.cloud.ces.v1beta.GetAppVersionRequest; @@ -627,6 +630,17 @@ public class GrpcAgentServiceStub extends AgentServiceStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + generateAppResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.ces.v1beta.AgentService/GenerateAppResource") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateAppResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private static final MethodDescriptor listChangelogsMethodDescriptor = MethodDescriptor.newBuilder() @@ -753,6 +767,12 @@ public class GrpcAgentServiceStub extends AgentServiceStub { private final OperationCallable< RestoreAppVersionRequest, RestoreAppVersionResponse, OperationMetadata> restoreAppVersionOperationCallable; + private final UnaryCallable generateAppResourceCallable; + private final OperationCallable< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationCallable; private final UnaryCallable listChangelogsCallable; private final UnaryCallable listChangelogsPagedCallable; @@ -1333,6 +1353,17 @@ protected GrpcAgentServiceStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + GrpcCallSettings generateAppResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(generateAppResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); GrpcCallSettings listChangelogsTransportSettings = GrpcCallSettings.newBuilder() @@ -1598,6 +1629,17 @@ protected GrpcAgentServiceStub( settings.restoreAppVersionOperationSettings(), clientContext, operationsStub); + this.generateAppResourceCallable = + callableFactory.createUnaryCallable( + generateAppResourceTransportSettings, + settings.generateAppResourceSettings(), + clientContext); + this.generateAppResourceOperationCallable = + callableFactory.createOperationCallable( + generateAppResourceTransportSettings, + settings.generateAppResourceOperationSettings(), + clientContext, + operationsStub); this.listChangelogsCallable = callableFactory.createUnaryCallable( listChangelogsTransportSettings, settings.listChangelogsSettings(), clientContext); @@ -1953,6 +1995,20 @@ public UnaryCallable restoreAppVersionCalla return restoreAppVersionOperationCallable; } + @Override + public UnaryCallable generateAppResourceCallable() { + return generateAppResourceCallable; + } + + @Override + public OperationCallable< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationCallable() { + return generateAppResourceOperationCallable; + } + @Override public UnaryCallable listChangelogsCallable() { return listChangelogsCallable; diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAgentServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAgentServiceStub.java index 6ed1509df366..2230511209e3 100644 --- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAgentServiceStub.java +++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAgentServiceStub.java @@ -73,6 +73,9 @@ import com.google.cloud.ces.v1beta.Example; import com.google.cloud.ces.v1beta.ExportAppRequest; import com.google.cloud.ces.v1beta.ExportAppResponse; +import com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata; +import com.google.cloud.ces.v1beta.GenerateAppResourceRequest; +import com.google.cloud.ces.v1beta.GenerateAppResourceResponse; import com.google.cloud.ces.v1beta.GetAgentRequest; import com.google.cloud.ces.v1beta.GetAppRequest; import com.google.cloud.ces.v1beta.GetAppVersionRequest; @@ -148,7 +151,9 @@ public class HttpJsonAgentServiceStub extends AgentServiceStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() + .add(GenerateAppResourceOperationMetadata.getDescriptor()) .add(Empty.getDescriptor()) + .add(GenerateAppResourceResponse.getDescriptor()) .add(RestoreAppVersionResponse.getDescriptor()) .add(ExportAppResponse.getDescriptor()) .add(BatchDeleteConversationsResponse.getDescriptor()) @@ -1919,6 +1924,46 @@ public class HttpJsonAgentServiceStub extends AgentServiceStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + generateAppResourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ces.v1beta.AgentService/GenerateAppResource") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/apps/*}:generateAppResource", + 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( + (GenerateAppResourceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listChangelogsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -2142,6 +2187,12 @@ public class HttpJsonAgentServiceStub extends AgentServiceStub { private final OperationCallable< RestoreAppVersionRequest, RestoreAppVersionResponse, OperationMetadata> restoreAppVersionOperationCallable; + private final UnaryCallable generateAppResourceCallable; + private final OperationCallable< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationCallable; private final UnaryCallable listChangelogsCallable; private final UnaryCallable listChangelogsPagedCallable; @@ -2798,6 +2849,19 @@ protected HttpJsonAgentServiceStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + HttpJsonCallSettings + generateAppResourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(generateAppResourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); HttpJsonCallSettings listChangelogsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -3068,6 +3132,17 @@ protected HttpJsonAgentServiceStub( settings.restoreAppVersionOperationSettings(), clientContext, httpJsonOperationsStub); + this.generateAppResourceCallable = + callableFactory.createUnaryCallable( + generateAppResourceTransportSettings, + settings.generateAppResourceSettings(), + clientContext); + this.generateAppResourceOperationCallable = + callableFactory.createOperationCallable( + generateAppResourceTransportSettings, + settings.generateAppResourceOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listChangelogsCallable = callableFactory.createUnaryCallable( listChangelogsTransportSettings, settings.listChangelogsSettings(), clientContext); @@ -3142,6 +3217,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(createAppVersionMethodDescriptor); methodDescriptors.add(deleteAppVersionMethodDescriptor); methodDescriptors.add(restoreAppVersionMethodDescriptor); + methodDescriptors.add(generateAppResourceMethodDescriptor); methodDescriptors.add(listChangelogsMethodDescriptor); methodDescriptors.add(getChangelogMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); @@ -3481,6 +3557,20 @@ public UnaryCallable restoreAppVersionCalla return restoreAppVersionOperationCallable; } + @Override + public UnaryCallable generateAppResourceCallable() { + return generateAppResourceCallable; + } + + @Override + public OperationCallable< + GenerateAppResourceRequest, + GenerateAppResourceResponse, + GenerateAppResourceOperationMetadata> + generateAppResourceOperationCallable() { + return generateAppResourceOperationCallable; + } + @Override public UnaryCallable listChangelogsCallable() { return listChangelogsCallable; diff --git a/java-ces/google-cloud-ces/src/main/resources/META-INF/native-image/com.google.cloud.ces.v1beta/reflect-config.json b/java-ces/google-cloud-ces/src/main/resources/META-INF/native-image/com.google.cloud.ces.v1beta/reflect-config.json index 75b48af12bdc..28650578353c 100644 --- a/java-ces/google-cloud-ces/src/main/resources/META-INF/native-image/com.google.cloud.ces.v1beta/reflect-config.json +++ b/java-ces/google-cloud-ces/src/main/resources/META-INF/native-image/com.google.cloud.ces.v1beta/reflect-config.json @@ -3536,6 +3536,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.ces.v1beta.FileContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.FileContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.FileContext$FileBytes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.FileContext$FileBytes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.ces.v1beta.FileSearchTool", "queryAllDeclaredConstructors": true, @@ -3563,6 +3599,213 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata$GenerationType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$AppGenerationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$AppGenerationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$EvaluationGenerationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$EvaluationGenerationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$EvaluationPersonasGenerationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$EvaluationPersonasGenerationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$HillClimbingFixConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$HillClimbingFixConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$QualityReportGenerationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$QualityReportGenerationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$RefineInstructions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$RefineInstructions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$ToolGenerationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$ToolGenerationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$ToolGenerationConfig$OpenApiToolsetGenerationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$ToolGenerationConfig$OpenApiToolsetGenerationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$ToolGenerationConfig$OpenApiToolsetGenerationConfig$OperationGenerationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ces.v1beta.GenerateAppResourceRequest$ToolGenerationConfig$OpenApiToolsetGenerationConfig$OperationGenerationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.ces.v1beta.GenerateAppResourceResponse", "queryAllDeclaredConstructors": true, diff --git a/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/AgentServiceClientHttpJsonTest.java b/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/AgentServiceClientHttpJsonTest.java index 1eb84a4d900b..7e9b5c265473 100644 --- a/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/AgentServiceClientHttpJsonTest.java +++ b/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/AgentServiceClientHttpJsonTest.java @@ -5793,6 +5793,106 @@ public void restoreAppVersionExceptionTest2() throws Exception { } } + @Test + public void generateAppResourceTest() throws Exception { + GenerateAppResourceResponse expectedResponse = + GenerateAppResourceResponse.newBuilder() + .setGenerateResultInfo( + GenerateAppResourceResponse.GenerateResultInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("generateAppResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]"); + + GenerateAppResourceResponse actualResponse = client.generateAppResourceAsync(parent).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 generateAppResourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]"); + client.generateAppResourceAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void generateAppResourceTest2() throws Exception { + GenerateAppResourceResponse expectedResponse = + GenerateAppResourceResponse.newBuilder() + .setGenerateResultInfo( + GenerateAppResourceResponse.GenerateResultInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("generateAppResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-8877/locations/location-8877/apps/app-8877"; + + GenerateAppResourceResponse actualResponse = client.generateAppResourceAsync(parent).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 generateAppResourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-8877/locations/location-8877/apps/app-8877"; + client.generateAppResourceAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listChangelogsTest() throws Exception { Changelog responsesElement = Changelog.newBuilder().build(); diff --git a/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/AgentServiceClientTest.java b/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/AgentServiceClientTest.java index 6c73c9bc38e6..0f29038f0e0a 100644 --- a/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/AgentServiceClientTest.java +++ b/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/AgentServiceClientTest.java @@ -5038,6 +5038,100 @@ public void restoreAppVersionExceptionTest2() throws Exception { } } + @Test + public void generateAppResourceTest() throws Exception { + GenerateAppResourceResponse expectedResponse = + GenerateAppResourceResponse.newBuilder() + .setGenerateResultInfo( + GenerateAppResourceResponse.GenerateResultInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("generateAppResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentService.addResponse(resultOperation); + + AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]"); + + GenerateAppResourceResponse actualResponse = client.generateAppResourceAsync(parent).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateAppResourceRequest actualRequest = ((GenerateAppResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateAppResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentService.addException(exception); + + try { + AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]"); + client.generateAppResourceAsync(parent).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 generateAppResourceTest2() throws Exception { + GenerateAppResourceResponse expectedResponse = + GenerateAppResourceResponse.newBuilder() + .setGenerateResultInfo( + GenerateAppResourceResponse.GenerateResultInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("generateAppResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentService.addResponse(resultOperation); + + String parent = "parent-995424086"; + + GenerateAppResourceResponse actualResponse = client.generateAppResourceAsync(parent).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateAppResourceRequest actualRequest = ((GenerateAppResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateAppResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentService.addException(exception); + + try { + String parent = "parent-995424086"; + client.generateAppResourceAsync(parent).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 listChangelogsTest() throws Exception { Changelog responsesElement = Changelog.newBuilder().build(); diff --git a/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/MockAgentServiceImpl.java b/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/MockAgentServiceImpl.java index 2dfca5ef812d..0898e91939a1 100644 --- a/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/MockAgentServiceImpl.java +++ b/java-ces/google-cloud-ces/src/test/java/com/google/cloud/ces/v1beta/MockAgentServiceImpl.java @@ -1052,6 +1052,27 @@ public void restoreAppVersion( } } + @Override + public void generateAppResource( + GenerateAppResourceRequest 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 GenerateAppResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void listChangelogs( ListChangelogsRequest request, StreamObserver responseObserver) { diff --git a/java-ces/grpc-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentServiceGrpc.java b/java-ces/grpc-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentServiceGrpc.java index f4e82afb1d31..805a57be01bc 100644 --- a/java-ces/grpc-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentServiceGrpc.java +++ b/java-ces/grpc-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentServiceGrpc.java @@ -2112,6 +2112,52 @@ private AgentServiceGrpc() {} return getRestoreAppVersionMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest, com.google.longrunning.Operation> + getGenerateAppResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateAppResource", + requestType = com.google.cloud.ces.v1beta.GenerateAppResourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest, com.google.longrunning.Operation> + getGenerateAppResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest, + com.google.longrunning.Operation> + getGenerateAppResourceMethod; + if ((getGenerateAppResourceMethod = AgentServiceGrpc.getGenerateAppResourceMethod) == null) { + synchronized (AgentServiceGrpc.class) { + if ((getGenerateAppResourceMethod = AgentServiceGrpc.getGenerateAppResourceMethod) + == null) { + AgentServiceGrpc.getGenerateAppResourceMethod = + getGenerateAppResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GenerateAppResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AgentServiceMethodDescriptorSupplier("GenerateAppResource")) + .build(); + } + } + } + return getGenerateAppResourceMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.ces.v1beta.ListChangelogsRequest, com.google.cloud.ces.v1beta.ListChangelogsResponse> @@ -2933,6 +2979,20 @@ default void restoreAppVersion( getRestoreAppVersionMethod(), responseObserver); } + /** + * + * + *
+     * Generates specific resources (e.g. agent) in the app using LLM assistant.
+     * 
+ */ + default void generateAppResource( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGenerateAppResourceMethod(), responseObserver); + } + /** * * @@ -3748,6 +3808,22 @@ public void restoreAppVersion( responseObserver); } + /** + * + * + *
+     * Generates specific resources (e.g. agent) in the app using LLM assistant.
+     * 
+ */ + public void generateAppResource( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateAppResourceMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -4439,6 +4515,20 @@ public com.google.longrunning.Operation restoreAppVersion( getChannel(), getRestoreAppVersionMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Generates specific resources (e.g. agent) in the app using LLM assistant.
+     * 
+ */ + public com.google.longrunning.Operation generateAppResource( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGenerateAppResourceMethod(), getCallOptions(), request); + } + /** * * @@ -5112,6 +5202,19 @@ public com.google.longrunning.Operation restoreAppVersion( getChannel(), getRestoreAppVersionMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Generates specific resources (e.g. agent) in the app using LLM assistant.
+     * 
+ */ + public com.google.longrunning.Operation generateAppResource( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateAppResourceMethod(), getCallOptions(), request); + } + /** * * @@ -5803,6 +5906,19 @@ public com.google.common.util.concurrent.ListenableFuture + * Generates specific resources (e.g. agent) in the app using LLM assistant. + * + */ + public com.google.common.util.concurrent.ListenableFuture + generateAppResource(com.google.cloud.ces.v1beta.GenerateAppResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateAppResourceMethod(), getCallOptions()), request); + } + /** * * @@ -5879,8 +5995,9 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -6159,6 +6276,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.ces.v1beta.RestoreAppVersionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GENERATE_APP_RESOURCE: + serviceImpl.generateAppResource( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_CHANGELOGS: serviceImpl.listChangelogs( (com.google.cloud.ces.v1beta.ListChangelogsRequest) request, @@ -6486,6 +6608,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.ces.v1beta.RestoreAppVersionRequest, com.google.longrunning.Operation>(service, METHODID_RESTORE_APP_VERSION))) + .addMethod( + getGenerateAppResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest, + com.google.longrunning.Operation>(service, METHODID_GENERATE_APP_RESOURCE))) .addMethod( getListChangelogsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -6598,6 +6726,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateAppVersionMethod()) .addMethod(getDeleteAppVersionMethod()) .addMethod(getRestoreAppVersionMethod()) + .addMethod(getGenerateAppResourceMethod()) .addMethod(getListChangelogsMethod()) .addMethod(getGetChangelogMethod()) .build(); diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentServiceProto.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentServiceProto.java index d311f37b67a6..8beb715947a6 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentServiceProto.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentServiceProto.java @@ -284,6 +284,46 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_ces_v1beta_RestoreAppVersionResponse_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_ces_v1beta_RestoreAppVersionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_RefineInstructions_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_RefineInstructions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_OperationGenerationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_OperationGenerationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_AppGenerationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_AppGenerationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationGenerationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationGenerationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationPersonasGenerationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationPersonasGenerationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_QualityReportGenerationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_QualityReportGenerationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_HillClimbingFixConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_HillClimbingFixConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_ces_v1beta_GenerateAppResourceResponse_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -316,6 +356,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_ces_v1beta_QualityReport_AgentIssues_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_ces_v1beta_QualityReport_AgentIssues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_GenerateAppResourceOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_GenerateAppResourceOperationMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_ces_v1beta_ListChangelogsRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -355,12 +399,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ta/app_version.proto\032\'google/cloud/ces/v" + "1beta/changelog.proto\032*google/cloud/ces/v1beta/conversation.proto\032(google/cloud/" + "ces/v1beta/deployment.proto\032(google/cloud/ces/v1beta/evaluation.proto\032%google/cl" - + "oud/ces/v1beta/example.proto\032\'google/clo" - + "ud/ces/v1beta/guardrail.proto\032/google/cl" - + "oud/ces/v1beta/security_settings.proto\032\"" - + "google/cloud/ces/v1beta/tool.proto\032%google/cloud/ces/v1beta/toolset.proto\032#googl" - + "e/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" - + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\236\001\n" + + "oud/ces/v1beta/example.proto\032*google/clo" + + "ud/ces/v1beta/file_context.proto\032\'google" + + "/cloud/ces/v1beta/guardrail.proto\032/google/cloud/ces/v1beta/security_settings.pro" + + "to\032\"google/cloud/ces/v1beta/tool.proto\032%" + + "google/cloud/ces/v1beta/toolset.proto\032#g" + + "oogle/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf" + + "/field_mask.proto\032\037google/protobuf/timestamp.proto\032\027google/rpc/status.proto\"\236\001\n" + "\017ListAppsRequest\022.\n" + "\006parent\030\001 \001(" + "\tB\036\340A\002\372A\030\022\026ces.googleapis.com/App\022\026\n" @@ -389,10 +435,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004etag\030\002 \001(\tB\003\340A\001\"\251\002\n" + "\020ExportAppRequest\022,\n" + "\004name\030\001 \001(\tB\036\340A\002\372A\030\n" - + "\026ces.googleapis.com/App\022R\n" - + "\r" - + "export_format\030\002 \001(\01626.google.cloud.ces." - + "v1beta.ExportAppRequest.ExportFormatB\003\340A\002\022\024\n" + + "\026ces.googleapis.com/App\022R\n\r" + + "export_format\030\002" + + " \001(\01626.google.cloud.ces.v1beta.ExportAppRequest.ExportFormatB\003\340A\002\022\024\n" + "\007gcs_uri\030\003 \001(\tB\003\340A\001\022:\n" + "\013app_version\030\004 \001(\tB%\340A\001\372A\037\n" + "\035ces.googleapis.com/AppVersion\"A\n" @@ -411,16 +456,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tB\036\340A\002\372A\030\022\026ces.googleapis.com/App\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\001\022\023\n" + "\006app_id\030\003 \001(\tB\003\340A\001\022T\n" - + "\016import_options\030\006 " - + "\001(\01327.google.cloud.ces.v1beta.ImportAppRequest.ImportOptionsB\003\340A\001\022\034\n" + + "\016import_options\030\006 \001(\01327.googl" + + "e.cloud.ces.v1beta.ImportAppRequest.ImportOptionsB\003\340A\001\022\034\n" + "\017ignore_app_lock\030\007 \001(\010B\003\340A\001\032\366\001\n\r" + "ImportOptions\022}\n" - + "\034conflict_resolution_strategy\030\001 \001(\0162R.google" - + ".cloud.ces.v1beta.ImportAppRequest.Impor" - + "tOptions.ConflictResolutionStrategyB\003\340A\001\"f\n" + + "\034conflict_resolution_strategy\030\001 \001(\0162R.google.cloud.ces." + + "v1beta.ImportAppRequest.ImportOptions.ConflictResolutionStrategyB\003\340A\001\"f\n" + "\032ConflictResolutionStrategy\022,\n" + "(CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED\020\000\022\013\n" - + "\007REPLACE\020\001\022\r\n" + + "\007REPLACE\020\001\022\r" + + "\n" + "\tOVERWRITE\020\002B\005\n" + "\003app\"P\n" + "\021ImportAppResponse\022)\n" @@ -475,8 +520,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(" + "\tB\"\340A\002\372A\034\022\032ces.googleapis.com/Example\022\027\n\n" + "example_id\030\002 \001(\tB\003\340A\001\0226\n" - + "\007example\030\003 \001(\0132 " - + ".google.cloud.ces.v1beta.ExampleB\003\340A\002\"\204\001\n" + + "\007example\030\003 \001(\0132" + + " .google.cloud.ces.v1beta.ExampleB\003\340A\002\"\204\001\n" + "\024UpdateExampleRequest\0226\n" + "\007example\030\001 \001(\0132 .google.cloud.ces.v1beta.ExampleB\003\340A\002\0224\n" + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"[\n" @@ -516,18 +561,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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\022A\n" - + "\006source\030\005" - + " \001(\0162,.google.cloud.ces.v1beta.Conversation.SourceB\003\340A\001\022B\n" - + "\007sources\030\006 \003(\016" - + "2,.google.cloud.ces.v1beta.Conversation.SourceB\003\340A\001\"r\n" + + "\006source\030\005 \001(" + + "\0162,.google.cloud.ces.v1beta.Conversation.SourceB\003\340A\001\022B\n" + + "\007sources\030\006 \003(\0162,.google.c" + + "loud.ces.v1beta.Conversation.SourceB\003\340A\001\"r\n" + "\031ListConversationsResponse\022<\n\r" + "conversations\030\001 \003(\0132%.google.cloud.ces.v1beta.Conversation\022\027\n" + "\017next_page_token\030\002 \001(\t\"\224\001\n" + "\026GetConversationRequest\0225\n" + "\004name\030\001 \001(\tB\'\340A\002\372A!\n" + "\037ces.googleapis.com/Conversation\022C\n" - + "\006source\030\002 \001(\0162,.google.cloud" - + ".ces.v1beta.Conversation.SourceB\005\030\001\340A\001\"\227\001\n" + + "\006source\030\002" + + " \001(\0162,.google.cloud.ces.v1beta.Conversation.SourceB\005\030\001\340A\001\"\227\001\n" + "\031DeleteConversationRequest\0225\n" + "\004name\030\001 \001(\tB\'\340A\002\372A!\n" + "\037ces.googleapis.com/Conversation\022C\n" @@ -559,8 +604,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(" + "\tB$\340A\002\372A\036\022\034ces.googleapis.com/Guardrail\022\031\n" + "\014guardrail_id\030\002 \001(\tB\003\340A\001\022:\n" - + "\tguardrail\030\003 \001(\0132\"." - + "google.cloud.ces.v1beta.GuardrailB\003\340A\002\"\212\001\n" + + "\tguardrail\030\003" + + " \001(\0132\".google.cloud.ces.v1beta.GuardrailB\003\340A\002\"\212\001\n" + "\026UpdateGuardrailRequest\022:\n" + "\tguardrail\030\001" + " \001(\0132\".google.cloud.ces.v1beta.GuardrailB\003\340A\002\0224\n" @@ -586,8 +631,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(" + "\tB%\340A\002\372A\037\022\035ces.googleapis.com/Deployment\022\032\n\r" + "deployment_id\030\003 \001(\tB\003\340A\001\022<\n\n" - + "deployment\030\002" - + " \001(\0132#.google.cloud.ces.v1beta.DeploymentB\003\340A\002\"\215\001\n" + + "deployment\030\002 \001(\0132#." + + "google.cloud.ces.v1beta.DeploymentB\003\340A\002\"\215\001\n" + "\027UpdateDeploymentRequest\022<\n\n" + "deployment\030\001 \001(\0132#.google.cloud.ces.v1beta.DeploymentB\003\340A\002\0224\n" + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"a\n" @@ -648,21 +693,84 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030RestoreAppVersionRequest\0223\n" + "\004name\030\001 \001(\tB%\340A\002\372A\037\n" + "\035ces.googleapis.com/AppVersion\"\033\n" - + "\031RestoreAppVersionResponse\"\264\007\n" + + "\031RestoreAppVersionResponse\"\375\022\n" + + "\032GenerateAppResourceRequest\022/\n" + + "\005agent\030\002 \001(\0132\036.google.cloud.ces.v1beta.AgentH\000\022-\n" + + "\004tool\030\004 \001(\0132\035.google.cloud.ces.v1beta.ToolH\000\0223\n" + + "\007toolset\030\006 \001(\0132 .google.cloud.ces.v1beta.ToolsetH\000\022.\n" + + "\006parent\030\001 \001(\tB\036\340A\002\372A\030\n" + + "\026ces.googleapis.com/App\022h\n" + + "\023refine_instructions\030\003 \003(\0132F.goog" + + "le.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsB\003\340A\001\022m\n" + + "\026tool_generation_config\030\005 \001(\0132H.google.cloud.ce" + + "s.v1beta.GenerateAppResourceRequest.ToolGenerationConfigB\003\340A\001\022k\n" + + "\025app_generation_config\030\007 \001(\0132G.google.cloud.ces.v1beta.G" + + "enerateAppResourceRequest.AppGenerationConfigB\003\340A\001\022y\n" + + "\034evaluation_generation_config\030\010 \001(\0132N.google.cloud.ces.v1beta.Gener" + + "ateAppResourceRequest.EvaluationGenerationConfigB\003\340A\001\022\212\001\n" + + "%evaluation_personas_generation_config\030\t \001(\0132V.google.cloud.ces" + + ".v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfigB\003\340A\001\022\200\001\n" + + " quality_report_generation_config\030\n" + + " \001(\0132Q.google.cloud.ces.v1beta.GenerateAppResou" + + "rceRequest.QualityReportGenerationConfigB\003\340A\001\022p\n" + + "\030hill_climbing_fix_config\030\013 \001(\0132" + + "I.google.cloud.ces.v1beta.GenerateAppRes" + + "ourceRequest.HillClimbingFixConfigB\003\340A\001\032\226\001\n" + + "\022RefineInstructions\022\030\n" + + "\013start_index\030\001 \001(\003B\003\340A\002\022\026\n" + + "\tend_index\030\002 \001(\003B\003\340A\002\0223\n\n" + + "field_mask\030\003 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\031\n" + + "\014instructions\030\004 \001(\tB\003\340A\002\032\352\004\n" + + "\024ToolGenerationConfig\022\024\n" + + "\007context\030\001 \001(\tB\003\340A\001\022@\n\r" + + "file_contexts\030\003" + + " \003(\0132$.google.cloud.ces.v1beta.FileContextB\003\340A\001\022\230\001\n" + + "\"open_api_toolset_generation_config\030\002 \001(\0132g.google." + + "cloud.ces.v1beta.GenerateAppResourceRequ" + + "est.ToolGenerationConfig.OpenApiToolsetGenerationConfigB\003\340A\001\032\336\002\n" + + "\036OpenApiToolsetGenerationConfig\022\020\n" + + "\003uri\030\001 \001(\tB\003\340A\002\022\255\001\n" + + "\034operation_generation_configs\030\002 \003(\0132\201\001.goog" + + "le.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiTools" + + "etGenerationConfig.OperationGenerationConfigB\003\340A\002\032z\n" + + "\031OperationGenerationConfig\022\023\n" + + "\006method\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004path\030\002 \001(\tB\003\340A\002\022\031\n" + + "\014request_json\030\003 \001(\tB\003\340A\002\022\032\n\r" + + "response_json\030\004 \001(\tB\003\340A\002\032\365\001\n" + + "\023AppGenerationConfig\022\024\n" + + "\007context\030\001 \001(\tB\003\340A\001\022@\n\r" + + "file_contexts\030\002 \003" + + "(\0132$.google.cloud.ces.v1beta.FileContextB\003\340A\001\022H\n\n" + + "dataset_id\030\003 \001(\tB4\340A\001\372A.\n" + + ",contactcenterinsights.googleapis.com/Dataset\022!\n" + + "\024generate_evaluations\030\004 \001(\010B\003\340A\001\022\031\n" + + "\014gcs_location\030\005 \001(\tB\003\340A\001\032f\n" + + "\032EvaluationGenerationConfig\022H\n\n" + + "dataset_id\030\001 \001(\tB4\340A\001\372A.\n" + + ",contactcenterinsights.googleapis.com/Dataset\032$\n" + + "\"EvaluationPersonasGenerationConfig\032a\n" + + "\035QualityReportGenerationConfig\022@\n" + + "\016evaluation_run\030\001 \001(\tB(\340A\002\372A\"\n" + + " ces.googleapis.com/EvaluationRun\032\\\n" + + "\025HillClimbingFixConfig\022C\n" + + "\016quality_report\030\001" + + " \001(\0132&.google.cloud.ces.v1beta.QualityReportB\003\340A\002B\n\n" + + "\010resource\"\264\007\n" + "\033GenerateAppResourceResponse\022/\n" + "\005agent\030\001 \001(\0132\036.google.cloud.ces.v1beta.AgentH\000\0223\n" + "\007toolset\030\003 \001(\0132 .google.cloud.ces.v1beta.ToolsetH\000\022<\n" + "\014app_snapshot\030\004 \001(\0132$.google.cloud.ces.v1beta.AppSnapshotH\000\022K\n" - + "\005tools\030\005 \001(\0132:" - + ".google.cloud.ces.v1beta.GenerateAppResourceResponse.ToolsH\000\022W\n" - + "\013evaluations\030\006 \001(" - + "\0132@.google.cloud.ces.v1beta.GenerateAppResourceResponse.EvaluationsH\000\022Z\n\r" - + "app_resources\030\007 \001(\0132A.google.cloud.ces.v1beta.G" - + "enerateAppResourceResponse.AppResourcesH\000\022@\n" + + "\005tools\030\005 \001(\0132:.google.cloud.ces.v" + + "1beta.GenerateAppResourceResponse.ToolsH\000\022W\n" + + "\013evaluations\030\006 \001(\0132@.google.cloud.ce" + + "s.v1beta.GenerateAppResourceResponse.EvaluationsH\000\022Z\n\r" + + "app_resources\030\007 \001(\0132A.goog" + + "le.cloud.ces.v1beta.GenerateAppResourceResponse.AppResourcesH\000\022@\n" + "\016quality_report\030\010" + " \001(\0132&.google.cloud.ces.v1beta.QualityReportH\000\022e\n" - + "\024generate_result_info\030\002 \001(\0132G.google.cloud.ces.v1b" - + "eta.GenerateAppResourceResponse.GenerateResultInfo\032G\n" + + "\024generate_result_info\030\002 \001(\0132G" + + ".google.cloud.ces.v1beta.GenerateAppResourceResponse.GenerateResultInfo\032G\n" + "\013Evaluations\0228\n" + "\013evaluations\030\001 \003(\0132#.google.cloud.ces.v1beta.Evaluation\0325\n" + "\005Tools\022,\n" @@ -674,19 +782,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013explanation\030\001 \001(\tB\024\n" + "\022generated_resource\"\211\003\n\r" + "QualityReport\022G\n" - + "\006issues\030\001" - + " \003(\01322.google.cloud.ces.v1beta.QualityReport.AgentIssuesB\003\340A\001\022\034\n" + + "\006issues\030\001 \003(\01322.goog" + + "le.cloud.ces.v1beta.QualityReport.AgentIssuesB\003\340A\001\022\034\n" + "\017evaluation_runs\030\002 \003(\tB\003\340A\001\022I\n" - + "\016general_issues\030\003 " - + "\003(\0132,.google.cloud.ces.v1beta.QualityReport.IssueB\003\340A\001\032`\n" + + "\016general_issues\030\003" + + " \003(\0132,.google.cloud.ces.v1beta.QualityReport.IssueB\003\340A\001\032`\n" + "\005Issue\022\030\n" + "\013description\030\001 \001(\tB\003\340A\001\022\035\n" + "\020occurrence_count\030\002 \001(\005B\003\340A\001\022\036\n" + "\021proposed_solution\030\003 \001(\tB\003\340A\001\032d\n" + "\013AgentIssues\022\022\n" + "\005agent\030\001 \001(\tB\003\340A\001\022A\n" - + "\006issues\030\002 " - + "\003(\0132,.google.cloud.ces.v1beta.QualityReport.IssueB\003\340A\001\"\252\001\n" + + "\006issues\030\002" + + " \003(\0132,.google.cloud.ces.v1beta.QualityReport.IssueB\003\340A\001\"\353\004\n" + + "$GenerateAppResourceOperationMetadata\022j\n" + + "\017generation_type\030\001 \001(\0162L.google.cloud.ces" + + ".v1beta.GenerateAppResourceOperationMetadata.GenerationTypeB\003\340A\003\022\024\n" + + "\007message\030\002 \001(\tB\003\340A\003\0224\n" + + "\013create_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023\n" + + "\006target\030\005 \001(\tB\003\340A\003\022/\n" + + "\016partial_errors\030\006 \003(\0132\022.google.rpc.StatusB\003\340A\003\"\221\002\n" + + "\016GenerationType\022\037\n" + + "\033GENERATION_TYPE_UNSPECIFIED\020\000\022\025\n" + + "\021AGENT_RESTRUCTURE\020\001\022\020\n" + + "\014AGENT_REFINE\020\002\022\020\n" + + "\014AGENT_CREATE\020\003\022\017\n" + + "\013TOOL_CREATE\020\004\022\023\n" + + "\017SCENARIO_CREATE\020\005\022$\n" + + " SCENARIO_CREATE_FROM_TRANSCRIPTS\020\007\022\035\n" + + "\031EVALUATION_PERSONA_CREATE\020\006\022\031\n" + + "\025QUALITY_REPORT_CREATE\020\010\022\035\n" + + "\031INSTRUCTION_FOLLOWING_FIX\020\t\"\252\001\n" + "\025ListChangelogsRequest\0224\n" + "\006parent\030\001 \001(" + "\tB$\340A\002\372A\036\022\034ces.googleapis.com/Changelog\022\026\n" @@ -704,231 +831,254 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB+\340A\002\372A%\n" + "#ces.googleapis.com/SecuritySettings\"\240\001\n" + "\035UpdateSecuritySettingsRequest\022I\n" - + "\021security_settings\030\001 \001(\0132" - + ").google.cloud.ces.v1beta.SecuritySettingsB\003\340A\002\0224\n" - + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\0012\313K\n" + + "\021security_settings\030\001 \001" + + "(\0132).google.cloud.ces.v1beta.SecuritySettingsB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\0012\326M\n" + "\014AgentService\022\236\001\n" - + "\010ListApps\022(.google.cloud.ces.v1beta.Li" - + "stAppsRequest\032).google.cloud.ces.v1beta." - + "ListAppsResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1be" - + "ta/{parent=projects/*/locations/*}/apps\022\213\001\n" - + "\006GetApp\022&.google.cloud.ces.v1beta.Get" - + "AppRequest\032\034.google.cloud.ces.v1beta.App" - + "\";\332A\004name\202\323\344\223\002.\022,/v1beta/{name=projects/*/locations/*/apps/*}\022\314\001\n" - + "\tCreateApp\022).go" - + "ogle.cloud.ces.v1beta.CreateAppRequest\032\035.google.longrunning.Operation\"u\312A\030\n" + + "\010ListApps\022(.google.cloud.ces.v1beta.ListAppsRequest\032).google.cloud.ces.v1be" + + "ta.ListAppsResponse\"=\332A\006parent\202\323\344\223\002.\022,/v" + + "1beta/{parent=projects/*/locations/*}/apps\022\213\001\n" + + "\006GetApp\022&.google.cloud.ces.v1beta.GetAppRequest\032\034.google.cloud.ces.v1beta." + + "App\";\332A\004name\202\323\344\223\002.\022,/v1beta/{name=projects/*/locations/*/apps/*}\022\314\001\n" + + "\tCreateApp\022)" + + ".google.cloud.ces.v1beta.CreateAppRequest\032\035.google.longrunning.Operation\"u\312A\030\n" + "\003App\022\021OperationMetadata\332A\021parent,app,app_id\332A\n" + "parent,app\202\323\344\223\0023\",/v1beta/{parent=projects/*/locations/*}/apps:\003app\022\245\001\n" - + "\tUpdateApp\022).google.cloud.ces.v1beta.UpdateAppRe" - + "quest\032\034.google.cloud.ces.v1beta.App\"O\332A\017" - + "app,update_mask\202\323\344\223\002720/v1beta/{app.name=projects/*/locations/*/apps/*}:\003app\022\277\001\n" - + "\tDeleteApp\022).google.cloud.ces.v1beta.Del" - + "eteAppRequest\032\035.google.longrunning.Operation\"h\312A*\n" - + "\025google.protobuf.Empty\022\021Operat" - + "ionMetadata\332A\004name\202\323\344\223\002.*,/v1beta/{name=projects/*/locations/*/apps/*}\022\310\001\n" - + "\tExportApp\022).google.cloud.ces.v1beta.ExportApp" - + "Request\032\035.google.longrunning.Operation\"q\312A&\n" - + "\021ExportAppResponse\022\021OperationMetadat" - + "a\332A\004name\202\323\344\223\002;\"6/v1beta/{name=projects/*/locations/*/apps/*}:exportApp:\001*\022\337\001\n" - + "\tImportApp\022).google.cloud.ces.v1beta.Import" - + "AppRequest\032\035.google.longrunning.Operation\"\207\001\312A&\n" - + "\021ImportAppResponse\022\021OperationMet" - + "adata\332A\032parent,display_name,app_id\202\323\344\223\002;" - + "\"6/v1beta/{parent=projects/*/locations/*}/apps:importApp:\001*\022\274\001\n" - + "\023GetSecuritySettings\0223.google.cloud.ces.v1beta.GetSecurit" + + "\tUpdateApp\022).google.cloud.ces.v1beta.UpdateAp" + + "pRequest\032\034.google.cloud.ces.v1beta.App\"O" + + "\332A\017app,update_mask\202\323\344\223\002720/v1beta/{app.n" + + "ame=projects/*/locations/*/apps/*}:\003app\022\277\001\n" + + "\tDeleteApp\022).google.cloud.ces.v1beta." + + "DeleteAppRequest\032\035.google.longrunning.Operation\"h\312A*\n" + + "\025google.protobuf.Empty\022\021Ope" + + "rationMetadata\332A\004name\202\323\344\223\002.*,/v1beta/{name=projects/*/locations/*/apps/*}\022\310\001\n" + + "\tExportApp\022).google.cloud.ces.v1beta.Export" + + "AppRequest\032\035.google.longrunning.Operation\"q\312A&\n" + + "\021ExportAppResponse\022\021OperationMeta" + + "data\332A\004name\202\323\344\223\002;\"6/v1beta/{name=projects/*/locations/*/apps/*}:exportApp:\001*\022\337\001\n" + + "\tImportApp\022).google.cloud.ces.v1beta.Imp" + + "ortAppRequest\032\035.google.longrunning.Operation\"\207\001\312A&\n" + + "\021ImportAppResponse\022\021Operation" + + "Metadata\332A\032parent,display_name,app_id\202\323\344" + + "\223\002;\"6/v1beta/{parent=projects/*/locations/*}/apps:importApp:\001*\022\274\001\n" + + "\023GetSecuritySettings\0223.google.cloud.ces.v1beta.GetSecu" + + "ritySettingsRequest\032).google.cloud.ces.v" + + "1beta.SecuritySettings\"E\332A\004name\202\323\344\223\0028\0226/" + + "v1beta/{name=projects/*/locations/*/securitySettings}\022\201\002\n" + + "\026UpdateSecuritySettings\0226.google.cloud.ces.v1beta.UpdateSecurit" + "ySettingsRequest\032).google.cloud.ces.v1be" - + "ta.SecuritySettings\"E\332A\004name\202\323\344\223\0028\0226/v1b" - + "eta/{name=projects/*/locations/*/securitySettings}\022\201\002\n" - + "\026UpdateSecuritySettings\0226.google.cloud.ces.v1beta.UpdateSecuritySe" - + "ttingsRequest\032).google.cloud.ces.v1beta." - + "SecuritySettings\"\203\001\332A\035security_settings," - + "update_mask\202\323\344\223\002]2H/v1beta/{security_set" - + "tings.name=projects/*/locations/*/securitySettings}:\021security_settings\022\255\001\n\n" - + "ListAgents\022*.google.cloud.ces.v1beta.ListAgen" - + "tsRequest\032+.google.cloud.ces.v1beta.List" - + "AgentsResponse\"F\332A\006parent\202\323\344\223\0027\0225/v1beta" - + "/{parent=projects/*/locations/*/apps/*}/agents\022\232\001\n" - + "\010GetAgent\022(.google.cloud.ces.v1beta.GetAgentRequest\032\036.google.cloud.ces" - + ".v1beta.Agent\"D\332A\004name\202\323\344\223\0027\0225/v1beta/{n" - + "ame=projects/*/locations/*/apps/*/agents/*}\022\307\001\n" - + "\013CreateAgent\022+.google.cloud.ces.v1beta.CreateAgentRequest\032\036.google.cloud." - + "ces.v1beta.Agent\"k\332A\025parent,agent,agent_" - + "id\332A\014parent,agent\202\323\344\223\002>\"5/v1beta/{parent" - + "=projects/*/locations/*/apps/*}/agents:\005agent\022\272\001\n" - + "\013UpdateAgent\022+.google.cloud.ces.v1beta.UpdateAgentRequest\032\036.google.clou" - + "d.ces.v1beta.Agent\"^\332A\021agent,update_mask" - + "\202\323\344\223\002D2;/v1beta/{agent.name=projects/*/locations/*/apps/*/agents/*}:\005agent\022\230\001\n" - + "\013DeleteAgent\022+.google.cloud.ces.v1beta.Del" - + "eteAgentRequest\032\026.google.protobuf.Empty\"" - + "D\332A\004name\202\323\344\223\0027*5/v1beta/{name=projects/*/locations/*/apps/*/agents/*}\022\265\001\n" - + "\014ListExamples\022,.google.cloud.ces.v1beta.ListExa" - + "mplesRequest\032-.google.cloud.ces.v1beta.L" - + "istExamplesResponse\"H\332A\006parent\202\323\344\223\0029\0227/v" - + "1beta/{parent=projects/*/locations/*/apps/*}/examples\022\242\001\n\n" - + "GetExample\022*.google.cloud.ces.v1beta.GetExampleRequest\032 .googl" - + "e.cloud.ces.v1beta.Example\"F\332A\004name\202\323\344\223\002" - + "9\0227/v1beta/{name=projects/*/locations/*/apps/*/examples/*}\022\327\001\n\r" - + "CreateExample\022-.google.cloud.ces.v1beta.CreateExampleRequest\032" - + " .google.cloud.ces.v1beta.Example\"u\332" - + "A\031parent,example,example_id\332A\016parent,exa" - + "mple\202\323\344\223\002B\"7/v1beta/{parent=projects/*/locations/*/apps/*}/examples:\007example\022\310\001\n" - + "\r" - + "UpdateExample\022-.google.cloud.ces.v1beta.UpdateExampleRequest\032 .google.cloud.ces" - + ".v1beta.Example\"f\332A\023example,update_mask\202" - + "\323\344\223\002J2?/v1beta/{example.name=projects/*/" - + "locations/*/apps/*/examples/*}:\007example\022\236\001\n\r" - + "DeleteExample\022-.google.cloud.ces.v1beta.DeleteExampleRequest\032\026.google.protob" - + "uf.Empty\"F\332A\004name\202\323\344\223\0029*7/v1beta/{name=p" - + "rojects/*/locations/*/apps/*/examples/*}\022\251\001\n" - + "\tListTools\022).google.cloud.ces.v1beta.ListToolsRequest\032*.google.cloud.ces.v1b" - + "eta.ListToolsResponse\"E\332A\006parent\202\323\344\223\0026\0224" - + "/v1beta/{parent=projects/*/locations/*/apps/*}/tools\022\226\001\n" - + "\007GetTool\022\'.google.cloud.ces.v1beta.GetToolRequest\032\035.google.cloud" - + ".ces.v1beta.Tool\"C\332A\004name\202\323\344\223\0026\0224/v1beta" - + "/{name=projects/*/locations/*/apps/*/tools/*}\022\311\001\n" - + "\021ListConversations\0221.google.cloud.ces.v1beta.ListConversationsRequest\0322" - + ".google.cloud.ces.v1beta.ListConversatio" - + "nsResponse\"M\332A\006parent\202\323\344\223\002>\022\022*\"5/v1beta/{par" + + "ent=projects/*/locations/*/apps/*}/agent" + + "s:\005agent\022\272\001\n\013UpdateAgent\022+.google.cloud." + + "ces.v1beta.UpdateAgentRequest\032\036.google.c" + + "loud.ces.v1beta.Agent\"^\332A\021agent,update_m" + + "ask\202\323\344\223\002D2;/v1beta/{agent.name=projects/" + + "*/locations/*/apps/*/agents/*}:\005agent\022\230\001" + + "\n\013DeleteAgent\022+.google.cloud.ces.v1beta." + + "DeleteAgentRequest\032\026.google.protobuf.Emp" + + "ty\"D\332A\004name\202\323\344\223\0027*5/v1beta/{name=project" + + "s/*/locations/*/apps/*/agents/*}\022\265\001\n\014Lis" + + "tExamples\022,.google.cloud.ces.v1beta.List" + + "ExamplesRequest\032-.google.cloud.ces.v1bet" + + "a.ListExamplesResponse\"H\332A\006parent\202\323\344\223\0029\022" + + "7/v1beta/{parent=projects/*/locations/*/" + + "apps/*}/examples\022\242\001\n\nGetExample\022*.google" + + ".cloud.ces.v1beta.GetExampleRequest\032 .go" + + "ogle.cloud.ces.v1beta.Example\"F\332A\004name\202\323" + + "\344\223\0029\0227/v1beta/{name=projects/*/locations" + + "/*/apps/*/examples/*}\022\327\001\n\rCreateExample\022" + + "-.google.cloud.ces.v1beta.CreateExampleR" + + "equest\032 .google.cloud.ces.v1beta.Example" + + "\"u\332A\031parent,example,example_id\332A\016parent," + + "example\202\323\344\223\002B\"7/v1beta/{parent=projects/" + + "*/locations/*/apps/*}/examples:\007example\022" + + "\310\001\n\rUpdateExample\022-.google.cloud.ces.v1b" + + "eta.UpdateExampleRequest\032 .google.cloud." + + "ces.v1beta.Example\"f\332A\023example,update_ma" + + "sk\202\323\344\223\002J2?/v1beta/{example.name=projects" + + "/*/locations/*/apps/*/examples/*}:\007examp" + + "le\022\236\001\n\rDeleteExample\022-.google.cloud.ces." + + "v1beta.DeleteExampleRequest\032\026.google.pro" + + "tobuf.Empty\"F\332A\004name\202\323\344\223\0029*7/v1beta/{nam" + + "e=projects/*/locations/*/apps/*/examples" + + "/*}\022\251\001\n\tListTools\022).google.cloud.ces.v1b" + + "eta.ListToolsRequest\032*.google.cloud.ces." + + "v1beta.ListToolsResponse\"E\332A\006parent\202\323\344\223\002" + + "6\0224/v1beta/{parent=projects/*/locations/" + + "*/apps/*}/tools\022\226\001\n\007GetTool\022\'.google.clo" + + "ud.ces.v1beta.GetToolRequest\032\035.google.cl" + + "oud.ces.v1beta.Tool\"C\332A\004name\202\323\344\223\0026\0224/v1b" + "eta/{name=projects/*/locations/*/apps/*/" - + "toolsets/*}\022\276\001\n\017ListAppVersions\022/.google" - + ".cloud.ces.v1beta.ListAppVersionsRequest" - + "\0320.google.cloud.ces.v1beta.ListAppVersio" - + "nsResponse\"H\332A\006parent\202\323\344\223\0029\0227/v1beta/{pa" - + "rent=projects/*/locations/*/apps/*}/vers" - + "ions\022\253\001\n\rGetAppVersion\022-.google.cloud.ce" - + "s.v1beta.GetAppVersionRequest\032#.google.c" - + "loud.ces.v1beta.AppVersion\"F\332A\004name\202\323\344\223\002" - + "9\0227/v1beta/{name=projects/*/locations/*/" - + "apps/*/versions/*}\022\361\001\n\020CreateAppVersion\022" - + "0.google.cloud.ces.v1beta.CreateAppVersi" - + "onRequest\032#.google.cloud.ces.v1beta.AppV" - + "ersion\"\205\001\332A!parent,app_version,app_versi" - + "on_id\332A\022parent,app_version\202\323\344\223\002F\"7/v1bet" - + "a/{parent=projects/*/locations/*/apps/*}" - + "/versions:\013app_version\022\244\001\n\020DeleteAppVers" - + "ion\0220.google.cloud.ces.v1beta.DeleteAppV" - + "ersionRequest\032\026.google.protobuf.Empty\"F\332" - + "A\004name\202\323\344\223\0029*7/v1beta/{name=projects/*/l" - + "ocations/*/apps/*/versions/*}\022\352\001\n\021Restor" - + "eAppVersion\0221.google.cloud.ces.v1beta.Re" - + "storeAppVersionRequest\032\035.google.longrunn" - + "ing.Operation\"\202\001\312A.\n\031RestoreAppVersionRe" - + "sponse\022\021OperationMetadata\332A\004name\202\323\344\223\002D\"?" - + "/v1beta/{name=projects/*/locations/*/app" - + "s/*/versions/*}:restore:\001*\022\275\001\n\016ListChang" - + "elogs\022..google.cloud.ces.v1beta.ListChan" - + "gelogsRequest\032/.google.cloud.ces.v1beta." - + "ListChangelogsResponse\"J\332A\006parent\202\323\344\223\002;\022" - + "9/v1beta/{parent=projects/*/locations/*/" - + "apps/*}/changelogs\022\252\001\n\014GetChangelog\022,.go" - + "ogle.cloud.ces.v1beta.GetChangelogReques" - + "t\032\".google.cloud.ces.v1beta.Changelog\"H\332" - + "A\004name\202\323\344\223\002;\0229/v1beta/{name=projects/*/l" - + "ocations/*/apps/*/changelogs/*}\032j\312A\022ces." - + "googleapis.com\322ARhttps://www.googleapis." - + "com/auth/ces,https://www.googleapis.com/" - + "auth/cloud-platformB\316\001\n\033com.google.cloud" - + ".ces.v1betaB\021AgentServiceProtoP\001Z-cloud." - + "google.com/go/ces/apiv1beta/cespb;cespb\352" - + "Aj\n,contactcenterinsights.googleapis.com" - + "/Dataset\022:projects/{project}/locations/{" - + "location}/datasets/{dataset}b\006proto3" + + "tools/*}\022\311\001\n\021ListConversations\0221.google." + + "cloud.ces.v1beta.ListConversationsReques" + + "t\0322.google.cloud.ces.v1beta.ListConversa" + + "tionsResponse\"M\332A\006parent\202\323\344\223\002>\022\022* - * Optional. The resource name of the root agent that is the entry point of - * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}` + * Optional. Deprecated: Use `agent` instead. + * The resource name of the root agent that is the entry point of the tool. + * Format: `projects/{project}/locations/{location}/agents/{agent}` * * * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @return The rootAgent. */ @java.lang.Override + @java.lang.Deprecated public java.lang.String getRootAgent() { java.lang.Object ref = rootAgent_; if (ref instanceof java.lang.String) { @@ -214,17 +219,21 @@ public java.lang.String getRootAgent() { * * *
-   * Optional. The resource name of the root agent that is the entry point of
-   * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+   * Optional. Deprecated: Use `agent` instead.
+   * The resource name of the root agent that is the entry point of the tool.
+   * Format: `projects/{project}/locations/{location}/agents/{agent}`
    * 
* * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @return The bytes for rootAgent. */ @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString getRootAgentBytes() { java.lang.Object ref = rootAgent_; if (ref instanceof java.lang.String) { @@ -237,6 +246,65 @@ public com.google.protobuf.ByteString getRootAgentBytes() { } } + public static final int AGENT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object agent_ = ""; + + /** + * + * + *
+   * Optional. The resource name of the agent that is the entry point of the
+   * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+   * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The resource name of the agent that is the entry point of the
+   * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+   * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -260,6 +328,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rootAgent_)) { com.google.protobuf.GeneratedMessage.writeString(output, 3, rootAgent_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, agent_); + } getUnknownFields().writeTo(output); } @@ -278,6 +349,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rootAgent_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(3, rootAgent_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, agent_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -296,6 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getDescription().equals(other.getDescription())) return false; if (!getRootAgent().equals(other.getRootAgent())) return false; + if (!getAgent().equals(other.getAgent())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -313,6 +388,8 @@ public int hashCode() { hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + ROOT_AGENT_FIELD_NUMBER; hash = (53 * hash) + getRootAgent().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -455,6 +532,7 @@ public Builder clear() { name_ = ""; description_ = ""; rootAgent_ = ""; + agent_ = ""; return this; } @@ -500,6 +578,9 @@ private void buildPartial0(com.google.cloud.ces.v1beta.AgentTool result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.rootAgent_ = rootAgent_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.agent_ = agent_; + } } @java.lang.Override @@ -529,6 +610,11 @@ public Builder mergeFrom(com.google.cloud.ces.v1beta.AgentTool other) { bitField0_ |= 0x00000004; onChanged(); } + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -573,6 +659,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + agent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -820,16 +912,20 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The resource name of the root agent that is the entry point of
-     * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * Optional. Deprecated: Use `agent` instead.
+     * The resource name of the root agent that is the entry point of the tool.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`
      * 
* * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @return The rootAgent. */ + @java.lang.Deprecated public java.lang.String getRootAgent() { java.lang.Object ref = rootAgent_; if (!(ref instanceof java.lang.String)) { @@ -846,16 +942,20 @@ public java.lang.String getRootAgent() { * * *
-     * Optional. The resource name of the root agent that is the entry point of
-     * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * Optional. Deprecated: Use `agent` instead.
+     * The resource name of the root agent that is the entry point of the tool.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`
      * 
* * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @return The bytes for rootAgent. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getRootAgentBytes() { java.lang.Object ref = rootAgent_; if (ref instanceof String) { @@ -872,17 +972,21 @@ public com.google.protobuf.ByteString getRootAgentBytes() { * * *
-     * Optional. The resource name of the root agent that is the entry point of
-     * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * Optional. Deprecated: Use `agent` instead.
+     * The resource name of the root agent that is the entry point of the tool.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`
      * 
* * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @param value The rootAgent to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setRootAgent(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -897,16 +1001,20 @@ public Builder setRootAgent(java.lang.String value) { * * *
-     * Optional. The resource name of the root agent that is the entry point of
-     * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * Optional. Deprecated: Use `agent` instead.
+     * The resource name of the root agent that is the entry point of the tool.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`
      * 
* * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearRootAgent() { rootAgent_ = getDefaultInstance().getRootAgent(); bitField0_ = (bitField0_ & ~0x00000004); @@ -918,17 +1026,21 @@ public Builder clearRootAgent() { * * *
-     * Optional. The resource name of the root agent that is the entry point of
-     * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * Optional. Deprecated: Use `agent` instead.
+     * The resource name of the root agent that is the entry point of the tool.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`
      * 
* * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @param value The bytes for rootAgent to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setRootAgentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -940,6 +1052,132 @@ public Builder setRootAgentBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object agent_ = ""; + + /** + * + * + *
+     * Optional. The resource name of the agent that is the entry point of the
+     * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the agent that is the entry point of the
+     * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the agent that is the entry point of the
+     * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the agent that is the entry point of the
+     * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAgent() { + agent_ = getDefaultInstance().getAgent(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the agent that is the entry point of the
+     * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+     * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.AgentTool) } diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentToolOrBuilder.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentToolOrBuilder.java index 58c55829c34d..4e1ef31a60ae 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentToolOrBuilder.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentToolOrBuilder.java @@ -82,31 +82,71 @@ public interface AgentToolOrBuilder * * *
-   * Optional. The resource name of the root agent that is the entry point of
-   * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+   * Optional. Deprecated: Use `agent` instead.
+   * The resource name of the root agent that is the entry point of the tool.
+   * Format: `projects/{project}/locations/{location}/agents/{agent}`
    * 
* * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @return The rootAgent. */ + @java.lang.Deprecated java.lang.String getRootAgent(); /** * * *
-   * Optional. The resource name of the root agent that is the entry point of
-   * the tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+   * Optional. Deprecated: Use `agent` instead.
+   * The resource name of the root agent that is the entry point of the tool.
+   * Format: `projects/{project}/locations/{location}/agents/{agent}`
    * 
* * - * string root_agent = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * string root_agent = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * + * @deprecated google.cloud.ces.v1beta.AgentTool.root_agent is deprecated. See + * google/cloud/ces/v1beta/agent_tool.proto;l=37 * @return The bytes for rootAgent. */ + @java.lang.Deprecated com.google.protobuf.ByteString getRootAgentBytes(); + + /** + * + * + *
+   * Optional. The resource name of the agent that is the entry point of the
+   * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+   * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agent. + */ + java.lang.String getAgent(); + + /** + * + * + *
+   * Optional. The resource name of the agent that is the entry point of the
+   * tool. Format: `projects/{project}/locations/{location}/agents/{agent}`
+   * 
+ * + * + * string agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agent. + */ + com.google.protobuf.ByteString getAgentBytes(); } diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentToolProto.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentToolProto.java index 0bc49a63b8be..fcf4667585e5 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentToolProto.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/AgentToolProto.java @@ -56,12 +56,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n(google/cloud/ces/v1beta/agent_tool.pro" + "to\022\027google.cloud.ces.v1beta\032\037google/api/" + "field_behavior.proto\032\031google/api/resourc" - + "e.proto\"n\n\tAgentTool\022\021\n\004name\030\001 \001(\tB\003\340A\002\022" - + "\030\n\013description\030\002 \001(\tB\003\340A\001\0224\n\nroot_agent\030" - + "\003 \001(\tB \340A\001\372A\032\n\030ces.googleapis.com/AgentB" - + "^\n\033com.google.cloud.ces.v1betaB\016AgentToo" - + "lProtoP\001Z-cloud.google.com/go/ces/apiv1b" - + "eta/cespb;cespbb\006proto3" + + "e.proto\"\241\001\n\tAgentTool\022\021\n\004name\030\001 \001(\tB\003\340A\002" + + "\022\030\n\013description\030\002 \001(\tB\003\340A\001\0226\n\nroot_agent" + + "\030\003 \001(\tB\"\030\001\340A\001\372A\032\n\030ces.googleapis.com/Age" + + "nt\022/\n\005agent\030\004 \001(\tB \340A\001\372A\032\n\030ces.googleapi" + + "s.com/AgentB^\n\033com.google.cloud.ces.v1be" + + "taB\016AgentToolProtoP\001Z-cloud.google.com/g" + + "o/ces/apiv1beta/cespb;cespbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -76,7 +77,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_ces_v1beta_AgentTool_descriptor, new java.lang.String[] { - "Name", "Description", "RootAgent", + "Name", "Description", "RootAgent", "Agent", }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/Conversation.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/Conversation.java index 46a30a2b9353..e6a6fc7fce4b 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/Conversation.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/Conversation.java @@ -327,6 +327,17 @@ public enum Source implements com.google.protobuf.ProtocolMessageEnum { * EVAL = 3; */ EVAL(3), + /** + * + * + *
+     * The conversation is from an agent tool. Agent tool runs the agent in a
+     * separate session, which is persisted for testing and debugging purposes.
+     * 
+ * + * AGENT_TOOL = 4; + */ + AGENT_TOOL(4), UNRECOGNIZED(-1), ; @@ -384,6 +395,18 @@ public enum Source implements com.google.protobuf.ProtocolMessageEnum { */ public static final int EVAL_VALUE = 3; + /** + * + * + *
+     * The conversation is from an agent tool. Agent tool runs the agent in a
+     * separate session, which is persisted for testing and debugging purposes.
+     * 
+ * + * AGENT_TOOL = 4; + */ + public static final int AGENT_TOOL_VALUE = 4; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -416,6 +439,8 @@ public static Source forNumber(int value) { return SIMULATOR; case 3: return EVAL; + case 4: + return AGENT_TOOL; default: return null; } @@ -2408,7 +2433,7 @@ public int getTurnCount() { * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @return The enum numeric value on the wire for channelType. */ @java.lang.Override @@ -2429,7 +2454,7 @@ public int getChannelTypeValue() { * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @return The channelType. */ @java.lang.Override @@ -4656,7 +4681,7 @@ public Builder clearTurnCount() { * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @return The enum numeric value on the wire for channelType. */ @java.lang.Override @@ -4677,7 +4702,7 @@ public int getChannelTypeValue() { * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @param value The enum numeric value on the wire for channelType to set. * @return This builder for chaining. */ @@ -4701,7 +4726,7 @@ public Builder setChannelTypeValue(int value) { * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @return The channelType. */ @java.lang.Override @@ -4726,7 +4751,7 @@ public com.google.cloud.ces.v1beta.Conversation.ChannelType getChannelType() { * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @param value The channelType to set. * @return This builder for chaining. */ @@ -4753,7 +4778,7 @@ public Builder setChannelType(com.google.cloud.ces.v1beta.Conversation.ChannelTy * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/ConversationOrBuilder.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/ConversationOrBuilder.java index ab313c7b2763..281956077602 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/ConversationOrBuilder.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/ConversationOrBuilder.java @@ -227,7 +227,7 @@ public interface ConversationOrBuilder * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @return The enum numeric value on the wire for channelType. */ @java.lang.Deprecated @@ -245,7 +245,7 @@ public interface ConversationOrBuilder * * * @deprecated google.cloud.ces.v1beta.Conversation.channel_type is deprecated. See - * google/cloud/ces/v1beta/conversation.proto;l=126 + * google/cloud/ces/v1beta/conversation.proto;l=130 * @return The channelType. */ @java.lang.Deprecated diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/ConversationProto.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/ConversationProto.java index da38ce266d72..6686c1cd107e 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/ConversationProto.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/ConversationProto.java @@ -63,7 +63,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "rce.proto\032$google/cloud/ces/v1beta/commo" + "n.proto\032%google/cloud/ces/v1beta/example" + ".proto\032\037google/protobuf/timestamp.proto\"" - + "\234\n\n\014Conversation\022\021\n\004name\030\001 \001(\tB\003\340A\010\0223\n\ns" + + "\254\n\n\014Conversation\022\021\n\004name\030\001 \001(\tB\003\340A\010\0223\n\ns" + "tart_time\030\003 \001(\0132\032.google.protobuf.Timest" + "ampB\003\340A\003\0221\n\010end_time\030\004 \001(\0132\032.google.prot" + "obuf.TimestampB\003\340A\003\022>\n\005turns\030\006 \003(\0132*.goo" @@ -85,20 +85,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ssageB\003\340A\001\0225\n\troot_span\030\002 \001(\0132\035.google.c" + "loud.ces.v1beta.SpanB\003\340A\001\"P\n\013ChannelType" + "\022\034\n\030CHANNEL_TYPE_UNSPECIFIED\020\000\022\010\n\004TEXT\020\001" - + "\022\t\n\005AUDIO\020\002\022\016\n\nMULTIMODAL\020\003\"C\n\006Source\022\026\n" + + "\022\t\n\005AUDIO\020\002\022\016\n\nMULTIMODAL\020\003\"S\n\006Source\022\026\n" + "\022SOURCE_UNSPECIFIED\020\000\022\010\n\004LIVE\020\001\022\r\n\tSIMUL" - + "ATOR\020\002\022\010\n\004EVAL\020\003\"\265\001\n\tInputType\022\032\n\026INPUT_" - + "TYPE_UNSPECIFIED\020\000\022\023\n\017INPUT_TYPE_TEXT\020\001\022" - + "\024\n\020INPUT_TYPE_AUDIO\020\002\022\024\n\020INPUT_TYPE_IMAG" - + "E\020\003\022\023\n\017INPUT_TYPE_BLOB\020\004\022\034\n\030INPUT_TYPE_T" - + "OOL_RESPONSE\020\005\022\030\n\024INPUT_TYPE_VARIABLES\020\006" - + ":\223\001\352A\217\001\n\037ces.googleapis.com/Conversation" - + "\022Oprojects/{project}/locations/{location" - + "}/apps/{app}/conversations/{conversation" - + "}*\rconversations2\014conversationBa\n\033com.go" - + "ogle.cloud.ces.v1betaB\021ConversationProto" - + "P\001Z-cloud.google.com/go/ces/apiv1beta/ce" - + "spb;cespbb\006proto3" + + "ATOR\020\002\022\010\n\004EVAL\020\003\022\016\n\nAGENT_TOOL\020\004\"\265\001\n\tInp" + + "utType\022\032\n\026INPUT_TYPE_UNSPECIFIED\020\000\022\023\n\017IN" + + "PUT_TYPE_TEXT\020\001\022\024\n\020INPUT_TYPE_AUDIO\020\002\022\024\n" + + "\020INPUT_TYPE_IMAGE\020\003\022\023\n\017INPUT_TYPE_BLOB\020\004" + + "\022\034\n\030INPUT_TYPE_TOOL_RESPONSE\020\005\022\030\n\024INPUT_" + + "TYPE_VARIABLES\020\006:\223\001\352A\217\001\n\037ces.googleapis." + + "com/Conversation\022Oprojects/{project}/loc" + + "ations/{location}/apps/{app}/conversatio" + + "ns/{conversation}*\rconversations2\014conver" + + "sationBa\n\033com.google.cloud.ces.v1betaB\021C" + + "onversationProtoP\001Z-cloud.google.com/go/" + + "ces/apiv1beta/cespb;cespbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/DeleteConversationRequest.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/DeleteConversationRequest.java index 9ac29fb7f2e8..65e464fc604b 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/DeleteConversationRequest.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/DeleteConversationRequest.java @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @return The enum numeric value on the wire for source. */ @java.lang.Override @@ -167,7 +167,7 @@ public int getSourceValue() { * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @return The source. */ @java.lang.Override @@ -648,7 +648,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @return The enum numeric value on the wire for source. */ @java.lang.Override @@ -670,7 +670,7 @@ public int getSourceValue() { * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @param value The enum numeric value on the wire for source to set. * @return This builder for chaining. */ @@ -695,7 +695,7 @@ public Builder setSourceValue(int value) { * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @return The source. */ @java.lang.Override @@ -719,7 +719,7 @@ public com.google.cloud.ces.v1beta.Conversation.Source getSource() { * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @param value The source to set. * @return This builder for chaining. */ @@ -747,7 +747,7 @@ public Builder setSource(com.google.cloud.ces.v1beta.Conversation.Source value) * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/DeleteConversationRequestOrBuilder.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/DeleteConversationRequestOrBuilder.java index 5927517801de..a9619530777b 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/DeleteConversationRequestOrBuilder.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/DeleteConversationRequestOrBuilder.java @@ -69,7 +69,7 @@ public interface DeleteConversationRequestOrBuilder * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @return The enum numeric value on the wire for source. */ @java.lang.Deprecated @@ -88,7 +88,7 @@ public interface DeleteConversationRequestOrBuilder * * * @deprecated google.cloud.ces.v1beta.DeleteConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1189 + * google/cloud/ces/v1beta/agent_service.proto;l=1205 * @return The source. */ @java.lang.Deprecated diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContext.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContext.java new file mode 100644 index 000000000000..b6efbb3a1e59 --- /dev/null +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContext.java @@ -0,0 +1,1752 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/ces/v1beta/file_context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.ces.v1beta; + +/** + * + * + *
+ * Files to be used as context. Files can be provided as raw bytes.
+ * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.FileContext} + */ +@com.google.protobuf.Generated +public final class FileContext extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.FileContext) + FileContextOrBuilder { + 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= */ "", + "FileContext"); + } + + // Use FileContext.newBuilder() to construct. + private FileContext(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FileContext() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.FileContext.class, + com.google.cloud.ces.v1beta.FileContext.Builder.class); + } + + public interface FileBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.FileContext.FileBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the file provided as raw bytes.
+     * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileName. + */ + java.lang.String getFileName(); + + /** + * + * + *
+     * Required. The name of the file provided as raw bytes.
+     * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileName. + */ + com.google.protobuf.ByteString getFileNameBytes(); + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+     * Required. Raw bytes of the file.
+     * 
+ * + * bytes data = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); + } + + /** + * + * + *
+   * File provided as raw bytes.
+   * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.FileContext.FileBytes} + */ + public static final class FileBytes extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.FileContext.FileBytes) + FileBytesOrBuilder { + 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= */ "", + "FileBytes"); + } + + // Use FileBytes.newBuilder() to construct. + private FileBytes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FileBytes() { + fileName_ = ""; + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.FileContext.FileBytes.class, + com.google.cloud.ces.v1beta.FileContext.FileBytes.Builder.class); + } + + public static final int FILE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fileName_ = ""; + + /** + * + * + *
+     * Required. The name of the file provided as raw bytes.
+     * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileName. + */ + @java.lang.Override + public java.lang.String getFileName() { + java.lang.Object ref = fileName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileName_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The name of the file provided as raw bytes.
+     * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileNameBytes() { + java.lang.Object ref = fileName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
+     * Required. The IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 2 [(.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 IANA standard MIME type of the source data.
+     * 
+ * + * string mime_type = 2 [(.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 = 3; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * Required. Raw bytes of the file.
+     * 
+ * + * bytes data = 3 [(.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(fileName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, fileName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, mimeType_); + } + if (!data_.isEmpty()) { + output.writeBytes(3, 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(fileName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fileName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, mimeType_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, 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.ces.v1beta.FileContext.FileBytes)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.FileContext.FileBytes other = + (com.google.cloud.ces.v1beta.FileContext.FileBytes) obj; + + if (!getFileName().equals(other.getFileName())) return false; + 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) + FILE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFileName().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.ces.v1beta.FileContext.FileBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.FileContext.FileBytes 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.ces.v1beta.FileContext.FileBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.FileContext.FileBytes 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.ces.v1beta.FileContext.FileBytes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.FileContext.FileBytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.FileContext.FileBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.FileContext.FileBytes 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.ces.v1beta.FileContext.FileBytes parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.FileContext.FileBytes 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.ces.v1beta.FileContext.FileBytes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.FileContext.FileBytes 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.ces.v1beta.FileContext.FileBytes 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; + } + + /** + * + * + *
+     * File provided as raw bytes.
+     * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.FileContext.FileBytes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.FileContext.FileBytes) + com.google.cloud.ces.v1beta.FileContext.FileBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.FileContext.FileBytes.class, + com.google.cloud.ces.v1beta.FileContext.FileBytes.Builder.class); + } + + // Construct using com.google.cloud.ces.v1beta.FileContext.FileBytes.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fileName_ = ""; + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext.FileBytes getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.FileContext.FileBytes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext.FileBytes build() { + com.google.cloud.ces.v1beta.FileContext.FileBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext.FileBytes buildPartial() { + com.google.cloud.ces.v1beta.FileContext.FileBytes result = + new com.google.cloud.ces.v1beta.FileContext.FileBytes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ces.v1beta.FileContext.FileBytes result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fileName_ = fileName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.data_ = data_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ces.v1beta.FileContext.FileBytes) { + return mergeFrom((com.google.cloud.ces.v1beta.FileContext.FileBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ces.v1beta.FileContext.FileBytes other) { + if (other == com.google.cloud.ces.v1beta.FileContext.FileBytes.getDefaultInstance()) + return this; + if (!other.getFileName().isEmpty()) { + fileName_ = other.fileName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000002; + 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: + { + fileName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + data_ = input.readBytes(); + 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 fileName_ = ""; + + /** + * + * + *
+       * Required. The name of the file provided as raw bytes.
+       * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileName. + */ + public java.lang.String getFileName() { + java.lang.Object ref = fileName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The name of the file provided as raw bytes.
+       * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileName. + */ + public com.google.protobuf.ByteString getFileNameBytes() { + java.lang.Object ref = fileName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The name of the file provided as raw bytes.
+       * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The fileName to set. + * @return This builder for chaining. + */ + public Builder setFileName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fileName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the file provided as raw bytes.
+       * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFileName() { + fileName_ = getDefaultInstance().getFileName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The name of the file provided as raw bytes.
+       * 
+ * + * string file_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for fileName to set. + * @return This builder for chaining. + */ + public Builder setFileNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fileName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
+       * Required. The IANA standard MIME type of the source data.
+       * 
+ * + * string mime_type = 2 [(.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 IANA standard MIME type of the source data.
+       * 
+ * + * string mime_type = 2 [(.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 IANA standard MIME type of the source data.
+       * 
+ * + * string mime_type = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The IANA standard MIME type of the source data.
+       * 
+ * + * string mime_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The IANA standard MIME type of the source data.
+       * 
+ * + * string mime_type = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+       * Required. Raw bytes of the file.
+       * 
+ * + * bytes data = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + /** + * + * + *
+       * Required. Raw bytes of the file.
+       * 
+ * + * bytes data = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Raw bytes of the file.
+       * 
+ * + * bytes data = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000004); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.FileContext.FileBytes) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.FileContext.FileBytes) + private static final com.google.cloud.ces.v1beta.FileContext.FileBytes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ces.v1beta.FileContext.FileBytes(); + } + + public static com.google.cloud.ces.v1beta.FileContext.FileBytes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileBytes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.FileContext.FileBytes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int fileCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object file_; + + public enum FileCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FILE_BYTES(1), + FILE_NOT_SET(0); + private final int value; + + private FileCase(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 FileCase valueOf(int value) { + return forNumber(value); + } + + public static FileCase forNumber(int value) { + switch (value) { + case 1: + return FILE_BYTES; + case 0: + return FILE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FileCase getFileCase() { + return FileCase.forNumber(fileCase_); + } + + public static final int FILE_BYTES_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Optional. File provided as raw bytes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fileBytes field is set. + */ + @java.lang.Override + public boolean hasFileBytes() { + return fileCase_ == 1; + } + + /** + * + * + *
+   * Optional. File provided as raw bytes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fileBytes. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext.FileBytes getFileBytes() { + if (fileCase_ == 1) { + return (com.google.cloud.ces.v1beta.FileContext.FileBytes) file_; + } + return com.google.cloud.ces.v1beta.FileContext.FileBytes.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. File provided as raw bytes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext.FileBytesOrBuilder getFileBytesOrBuilder() { + if (fileCase_ == 1) { + return (com.google.cloud.ces.v1beta.FileContext.FileBytes) file_; + } + return com.google.cloud.ces.v1beta.FileContext.FileBytes.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 (fileCase_ == 1) { + output.writeMessage(1, (com.google.cloud.ces.v1beta.FileContext.FileBytes) file_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fileCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.ces.v1beta.FileContext.FileBytes) file_); + } + 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.ces.v1beta.FileContext)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.FileContext other = (com.google.cloud.ces.v1beta.FileContext) obj; + + if (!getFileCase().equals(other.getFileCase())) return false; + switch (fileCase_) { + case 1: + if (!getFileBytes().equals(other.getFileBytes())) 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 (fileCase_) { + case 1: + hash = (37 * hash) + FILE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getFileBytes().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.FileContext parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.FileContext 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.ces.v1beta.FileContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.FileContext 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.ces.v1beta.FileContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.FileContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.FileContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.FileContext 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.ces.v1beta.FileContext parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.FileContext 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.ces.v1beta.FileContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.FileContext 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.ces.v1beta.FileContext 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; + } + + /** + * + * + *
+   * Files to be used as context. Files can be provided as raw bytes.
+   * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.FileContext} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.FileContext) + com.google.cloud.ces.v1beta.FileContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.FileContext.class, + com.google.cloud.ces.v1beta.FileContext.Builder.class); + } + + // Construct using com.google.cloud.ces.v1beta.FileContext.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fileBytesBuilder_ != null) { + fileBytesBuilder_.clear(); + } + fileCase_ = 0; + file_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.FileContextProto + .internal_static_google_cloud_ces_v1beta_FileContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.FileContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext build() { + com.google.cloud.ces.v1beta.FileContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext buildPartial() { + com.google.cloud.ces.v1beta.FileContext result = + new com.google.cloud.ces.v1beta.FileContext(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ces.v1beta.FileContext result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.ces.v1beta.FileContext result) { + result.fileCase_ = fileCase_; + result.file_ = this.file_; + if (fileCase_ == 1 && fileBytesBuilder_ != null) { + result.file_ = fileBytesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ces.v1beta.FileContext) { + return mergeFrom((com.google.cloud.ces.v1beta.FileContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ces.v1beta.FileContext other) { + if (other == com.google.cloud.ces.v1beta.FileContext.getDefaultInstance()) return this; + switch (other.getFileCase()) { + case FILE_BYTES: + { + mergeFileBytes(other.getFileBytes()); + break; + } + case FILE_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( + internalGetFileBytesFieldBuilder().getBuilder(), extensionRegistry); + fileCase_ = 1; + 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 fileCase_ = 0; + private java.lang.Object file_; + + public FileCase getFileCase() { + return FileCase.forNumber(fileCase_); + } + + public Builder clearFile() { + fileCase_ = 0; + file_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.FileContext.FileBytes, + com.google.cloud.ces.v1beta.FileContext.FileBytes.Builder, + com.google.cloud.ces.v1beta.FileContext.FileBytesOrBuilder> + fileBytesBuilder_; + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fileBytes field is set. + */ + @java.lang.Override + public boolean hasFileBytes() { + return fileCase_ == 1; + } + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fileBytes. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext.FileBytes getFileBytes() { + if (fileBytesBuilder_ == null) { + if (fileCase_ == 1) { + return (com.google.cloud.ces.v1beta.FileContext.FileBytes) file_; + } + return com.google.cloud.ces.v1beta.FileContext.FileBytes.getDefaultInstance(); + } else { + if (fileCase_ == 1) { + return fileBytesBuilder_.getMessage(); + } + return com.google.cloud.ces.v1beta.FileContext.FileBytes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFileBytes(com.google.cloud.ces.v1beta.FileContext.FileBytes value) { + if (fileBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + file_ = value; + onChanged(); + } else { + fileBytesBuilder_.setMessage(value); + } + fileCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFileBytes( + com.google.cloud.ces.v1beta.FileContext.FileBytes.Builder builderForValue) { + if (fileBytesBuilder_ == null) { + file_ = builderForValue.build(); + onChanged(); + } else { + fileBytesBuilder_.setMessage(builderForValue.build()); + } + fileCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFileBytes(com.google.cloud.ces.v1beta.FileContext.FileBytes value) { + if (fileBytesBuilder_ == null) { + if (fileCase_ == 1 + && file_ != com.google.cloud.ces.v1beta.FileContext.FileBytes.getDefaultInstance()) { + file_ = + com.google.cloud.ces.v1beta.FileContext.FileBytes.newBuilder( + (com.google.cloud.ces.v1beta.FileContext.FileBytes) file_) + .mergeFrom(value) + .buildPartial(); + } else { + file_ = value; + } + onChanged(); + } else { + if (fileCase_ == 1) { + fileBytesBuilder_.mergeFrom(value); + } else { + fileBytesBuilder_.setMessage(value); + } + } + fileCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFileBytes() { + if (fileBytesBuilder_ == null) { + if (fileCase_ == 1) { + fileCase_ = 0; + file_ = null; + onChanged(); + } + } else { + if (fileCase_ == 1) { + fileCase_ = 0; + file_ = null; + } + fileBytesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext.FileBytes.Builder getFileBytesBuilder() { + return internalGetFileBytesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext.FileBytesOrBuilder getFileBytesOrBuilder() { + if ((fileCase_ == 1) && (fileBytesBuilder_ != null)) { + return fileBytesBuilder_.getMessageOrBuilder(); + } else { + if (fileCase_ == 1) { + return (com.google.cloud.ces.v1beta.FileContext.FileBytes) file_; + } + return com.google.cloud.ces.v1beta.FileContext.FileBytes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. File provided as raw bytes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.FileContext.FileBytes, + com.google.cloud.ces.v1beta.FileContext.FileBytes.Builder, + com.google.cloud.ces.v1beta.FileContext.FileBytesOrBuilder> + internalGetFileBytesFieldBuilder() { + if (fileBytesBuilder_ == null) { + if (!(fileCase_ == 1)) { + file_ = com.google.cloud.ces.v1beta.FileContext.FileBytes.getDefaultInstance(); + } + fileBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.FileContext.FileBytes, + com.google.cloud.ces.v1beta.FileContext.FileBytes.Builder, + com.google.cloud.ces.v1beta.FileContext.FileBytesOrBuilder>( + (com.google.cloud.ces.v1beta.FileContext.FileBytes) file_, + getParentForChildren(), + isClean()); + file_ = null; + } + fileCase_ = 1; + onChanged(); + return fileBytesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.FileContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.FileContext) + private static final com.google.cloud.ces.v1beta.FileContext DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ces.v1beta.FileContext(); + } + + public static com.google.cloud.ces.v1beta.FileContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.FileContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContextOrBuilder.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContextOrBuilder.java new file mode 100644 index 000000000000..4d8854e97700 --- /dev/null +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContextOrBuilder.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/ces/v1beta/file_context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.ces.v1beta; + +@com.google.protobuf.Generated +public interface FileContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.FileContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. File provided as raw bytes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the fileBytes field is set. + */ + boolean hasFileBytes(); + + /** + * + * + *
+   * Optional. File provided as raw bytes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The fileBytes. + */ + com.google.cloud.ces.v1beta.FileContext.FileBytes getFileBytes(); + + /** + * + * + *
+   * Optional. File provided as raw bytes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.FileContext.FileBytes file_bytes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.FileContext.FileBytesOrBuilder getFileBytesOrBuilder(); + + com.google.cloud.ces.v1beta.FileContext.FileCase getFileCase(); +} diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContextProto.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContextProto.java new file mode 100644 index 000000000000..779ee9248ced --- /dev/null +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/FileContextProto.java @@ -0,0 +1,106 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/ces/v1beta/file_context.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.ces.v1beta; + +@com.google.protobuf.Generated +public final class FileContextProto extends com.google.protobuf.GeneratedFile { + private FileContextProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FileContextProto"); + } + + 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_ces_v1beta_FileContext_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_FileContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_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/ces/v1beta/file_context.p" + + "roto\022\027google.cloud.ces.v1beta\032\037google/api/field_behavior.proto\"\260\001\n" + + "\013FileContext\022I\n\n" + + "file_bytes\030\001" + + " \001(\0132..google.cloud.ces.v1beta.FileContext.FileBytesB\003\340A\001H\000\032N\n" + + "\tFileBytes\022\026\n" + + "\tfile_name\030\001 \001(\tB\003\340A\002\022\026\n" + + "\tmime_type\030\002 \001(\tB\003\340A\002\022\021\n" + + "\004data\030\003 \001(\014B\003\340A\002B\006\n" + + "\004fileB`\n" + + "\033com.google.cloud.ces.v1betaB\020FileContextProtoP\001Z-cloud.google.com/go/ces/ap" + + "iv1beta/cespb;cespbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_ces_v1beta_FileContext_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_ces_v1beta_FileContext_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ces_v1beta_FileContext_descriptor, + new java.lang.String[] { + "FileBytes", "File", + }); + internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_descriptor = + internal_static_google_cloud_ces_v1beta_FileContext_descriptor.getNestedType(0); + internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ces_v1beta_FileContext_FileBytes_descriptor, + new java.lang.String[] { + "FileName", "MimeType", "Data", + }); + 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-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceOperationMetadata.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceOperationMetadata.java new file mode 100644 index 000000000000..819c95db6a99 --- /dev/null +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceOperationMetadata.java @@ -0,0 +1,2470 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/ces/v1beta/agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.ces.v1beta; + +/** + * + * + *
+ * Operation metadata for
+ * [AgentService.GenerateAppResource][google.cloud.ces.v1beta.AgentService.GenerateAppResource].
+ * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata} + */ +@com.google.protobuf.Generated +public final class GenerateAppResourceOperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata) + GenerateAppResourceOperationMetadataOrBuilder { + 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= */ "", + "GenerateAppResourceOperationMetadata"); + } + + // Use GenerateAppResourceOperationMetadata.newBuilder() to construct. + private GenerateAppResourceOperationMetadata( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GenerateAppResourceOperationMetadata() { + generationType_ = 0; + message_ = ""; + target_ = ""; + partialErrors_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.class, + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.Builder.class); + } + + /** + * + * + *
+   * The type of the generation operation.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType} + */ + public enum GenerationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified operation type.
+     * 
+ * + * GENERATION_TYPE_UNSPECIFIED = 0; + */ + GENERATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Agent instruction restructure type.
+     * 
+ * + * AGENT_RESTRUCTURE = 1; + */ + AGENT_RESTRUCTURE(1), + /** + * + * + *
+     * Agent instruction refinement type.
+     * 
+ * + * AGENT_REFINE = 2; + */ + AGENT_REFINE(2), + /** + * + * + *
+     * Agent creation from type.
+     * 
+ * + * AGENT_CREATE = 3; + */ + AGENT_CREATE(3), + /** + * + * + *
+     * Tool creation type.
+     * 
+ * + * TOOL_CREATE = 4; + */ + TOOL_CREATE(4), + /** + * + * + *
+     * Scenario creation type.
+     * 
+ * + * SCENARIO_CREATE = 5; + */ + SCENARIO_CREATE(5), + /** + * + * + *
+     * Scenario creation from transcripts type.
+     * 
+ * + * SCENARIO_CREATE_FROM_TRANSCRIPTS = 7; + */ + SCENARIO_CREATE_FROM_TRANSCRIPTS(7), + /** + * + * + *
+     * Evaluation persona generation type.
+     * 
+ * + * EVALUATION_PERSONA_CREATE = 6; + */ + EVALUATION_PERSONA_CREATE(6), + /** + * + * + *
+     * Quality report generation type.
+     * 
+ * + * QUALITY_REPORT_CREATE = 8; + */ + QUALITY_REPORT_CREATE(8), + /** + * + * + *
+     * Instruction following fix type (used for hill climbing fixes).
+     * 
+ * + * INSTRUCTION_FOLLOWING_FIX = 9; + */ + INSTRUCTION_FOLLOWING_FIX(9), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerationType"); + } + + /** + * + * + *
+     * Unspecified operation type.
+     * 
+ * + * GENERATION_TYPE_UNSPECIFIED = 0; + */ + public static final int GENERATION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Agent instruction restructure type.
+     * 
+ * + * AGENT_RESTRUCTURE = 1; + */ + public static final int AGENT_RESTRUCTURE_VALUE = 1; + + /** + * + * + *
+     * Agent instruction refinement type.
+     * 
+ * + * AGENT_REFINE = 2; + */ + public static final int AGENT_REFINE_VALUE = 2; + + /** + * + * + *
+     * Agent creation from type.
+     * 
+ * + * AGENT_CREATE = 3; + */ + public static final int AGENT_CREATE_VALUE = 3; + + /** + * + * + *
+     * Tool creation type.
+     * 
+ * + * TOOL_CREATE = 4; + */ + public static final int TOOL_CREATE_VALUE = 4; + + /** + * + * + *
+     * Scenario creation type.
+     * 
+ * + * SCENARIO_CREATE = 5; + */ + public static final int SCENARIO_CREATE_VALUE = 5; + + /** + * + * + *
+     * Scenario creation from transcripts type.
+     * 
+ * + * SCENARIO_CREATE_FROM_TRANSCRIPTS = 7; + */ + public static final int SCENARIO_CREATE_FROM_TRANSCRIPTS_VALUE = 7; + + /** + * + * + *
+     * Evaluation persona generation type.
+     * 
+ * + * EVALUATION_PERSONA_CREATE = 6; + */ + public static final int EVALUATION_PERSONA_CREATE_VALUE = 6; + + /** + * + * + *
+     * Quality report generation type.
+     * 
+ * + * QUALITY_REPORT_CREATE = 8; + */ + public static final int QUALITY_REPORT_CREATE_VALUE = 8; + + /** + * + * + *
+     * Instruction following fix type (used for hill climbing fixes).
+     * 
+ * + * INSTRUCTION_FOLLOWING_FIX = 9; + */ + public static final int INSTRUCTION_FOLLOWING_FIX_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 GenerationType 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 GenerationType forNumber(int value) { + switch (value) { + case 0: + return GENERATION_TYPE_UNSPECIFIED; + case 1: + return AGENT_RESTRUCTURE; + case 2: + return AGENT_REFINE; + case 3: + return AGENT_CREATE; + case 4: + return TOOL_CREATE; + case 5: + return SCENARIO_CREATE; + case 7: + return SCENARIO_CREATE_FROM_TRANSCRIPTS; + case 6: + return EVALUATION_PERSONA_CREATE; + case 8: + return QUALITY_REPORT_CREATE; + case 9: + return INSTRUCTION_FOLLOWING_FIX; + 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 GenerationType findValueByNumber(int number) { + return GenerationType.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.ces.v1beta.GenerateAppResourceOperationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GenerationType[] VALUES = values(); + + public static GenerationType 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 GenerationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType) + } + + private int bitField0_; + public static final int GENERATION_TYPE_FIELD_NUMBER = 1; + private int generationType_ = 0; + + /** + * + * + *
+   * Output only. The type of the operation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for generationType. + */ + @java.lang.Override + public int getGenerationTypeValue() { + return generationType_; + } + + /** + * + * + *
+   * Output only. The type of the operation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The generationType. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType + getGenerationType() { + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType result = + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType.forNumber( + generationType_); + return result == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType + .UNRECOGNIZED + : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = 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. The time the operation was created.
+   * 
+ * + * .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. The time the operation was created.
+   * 
+ * + * .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. The time the operation was created.
+   * 
+ * + * .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 END_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the app that the operation is associated
+   * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+   * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the app that the operation is associated
+   * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+   * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTIAL_ERRORS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List partialErrors_; + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPartialErrorsList() { + return partialErrors_; + } + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPartialErrorsOrBuilderList() { + return partialErrors_; + } + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPartialErrorsCount() { + return partialErrors_.size(); + } + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.Status getPartialErrors(int index) { + return partialErrors_.get(index); + } + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getPartialErrorsOrBuilder(int index) { + return partialErrors_.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 (generationType_ + != com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType + .GENERATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, generationType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, target_); + } + for (int i = 0; i < partialErrors_.size(); i++) { + output.writeMessage(6, partialErrors_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (generationType_ + != com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType + .GENERATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, generationType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, target_); + } + for (int i = 0; i < partialErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, partialErrors_.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.ces.v1beta.GenerateAppResourceOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata other = + (com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata) obj; + + if (generationType_ != other.generationType_) return false; + if (!getMessage().equals(other.getMessage())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getPartialErrorsList().equals(other.getPartialErrorsList())) 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) + GENERATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + generationType_; + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + if (getPartialErrorsCount() > 0) { + hash = (37 * hash) + PARTIAL_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getPartialErrorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata 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.ces.v1beta.GenerateAppResourceOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata 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.ces.v1beta.GenerateAppResourceOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata 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.ces.v1beta.GenerateAppResourceOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata 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.ces.v1beta.GenerateAppResourceOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata 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.ces.v1beta.GenerateAppResourceOperationMetadata 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; + } + + /** + * + * + *
+   * Operation metadata for
+   * [AgentService.GenerateAppResource][google.cloud.ces.v1beta.AgentService.GenerateAppResource].
+   * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata) + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.class, + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.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(); + internalGetEndTimeFieldBuilder(); + internalGetPartialErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + generationType_ = 0; + message_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + if (partialErrorsBuilder_ == null) { + partialErrors_ = java.util.Collections.emptyList(); + } else { + partialErrors_ = null; + partialErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata build() { + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata result = + new com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata result) { + if (partialErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + partialErrors_ = java.util.Collections.unmodifiableList(partialErrors_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.partialErrors_ = partialErrors_; + } else { + result.partialErrors_ = partialErrorsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.generationType_ = generationType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.target_ = target_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata) { + return mergeFrom((com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.getDefaultInstance()) + return this; + if (other.generationType_ != 0) { + setGenerationTypeValue(other.getGenerationTypeValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (partialErrorsBuilder_ == null) { + if (!other.partialErrors_.isEmpty()) { + if (partialErrors_.isEmpty()) { + partialErrors_ = other.partialErrors_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensurePartialErrorsIsMutable(); + partialErrors_.addAll(other.partialErrors_); + } + onChanged(); + } + } else { + if (!other.partialErrors_.isEmpty()) { + if (partialErrorsBuilder_.isEmpty()) { + partialErrorsBuilder_.dispose(); + partialErrorsBuilder_ = null; + partialErrors_ = other.partialErrors_; + bitField0_ = (bitField0_ & ~0x00000020); + partialErrorsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPartialErrorsFieldBuilder() + : null; + } else { + partialErrorsBuilder_.addAllMessages(other.partialErrors_); + } + } + } + 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: + { + generationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (partialErrorsBuilder_ == null) { + ensurePartialErrorsIsMutable(); + partialErrors_.add(m); + } else { + partialErrorsBuilder_.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 int generationType_ = 0; + + /** + * + * + *
+     * Output only. The type of the operation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for generationType. + */ + @java.lang.Override + public int getGenerationTypeValue() { + return generationType_; + } + + /** + * + * + *
+     * Output only. The type of the operation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for generationType to set. + * @return This builder for chaining. + */ + public Builder setGenerationTypeValue(int value) { + generationType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the operation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The generationType. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType + getGenerationType() { + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType result = + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType.forNumber( + generationType_); + return result == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The type of the operation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The generationType to set. + * @return This builder for chaining. + */ + public Builder setGenerationType( + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + generationType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the operation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearGenerationType() { + bitField0_ = (bitField0_ & ~0x00000001); + generationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000002; + 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 time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .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(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .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_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .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_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .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_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000008); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_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> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the app that the operation is associated
+     * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+     * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the app that the operation is associated
+     * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+     * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the app that the operation is associated
+     * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+     * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the app that the operation is associated
+     * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+     * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the app that the operation is associated
+     * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+     * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.util.List partialErrors_ = + java.util.Collections.emptyList(); + + private void ensurePartialErrorsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + partialErrors_ = new java.util.ArrayList(partialErrors_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + partialErrorsBuilder_; + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPartialErrorsList() { + if (partialErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialErrors_); + } else { + return partialErrorsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPartialErrorsCount() { + if (partialErrorsBuilder_ == null) { + return partialErrors_.size(); + } else { + return partialErrorsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status getPartialErrors(int index) { + if (partialErrorsBuilder_ == null) { + return partialErrors_.get(index); + } else { + return partialErrorsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPartialErrors(int index, com.google.rpc.Status value) { + if (partialErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialErrorsIsMutable(); + partialErrors_.set(index, value); + onChanged(); + } else { + partialErrorsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPartialErrors(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialErrorsBuilder_ == null) { + ensurePartialErrorsIsMutable(); + partialErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + partialErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialErrors(com.google.rpc.Status value) { + if (partialErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialErrorsIsMutable(); + partialErrors_.add(value); + onChanged(); + } else { + partialErrorsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialErrors(int index, com.google.rpc.Status value) { + if (partialErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialErrorsIsMutable(); + partialErrors_.add(index, value); + onChanged(); + } else { + partialErrorsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialErrors(com.google.rpc.Status.Builder builderForValue) { + if (partialErrorsBuilder_ == null) { + ensurePartialErrorsIsMutable(); + partialErrors_.add(builderForValue.build()); + onChanged(); + } else { + partialErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialErrors(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialErrorsBuilder_ == null) { + ensurePartialErrorsIsMutable(); + partialErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + partialErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPartialErrors(java.lang.Iterable values) { + if (partialErrorsBuilder_ == null) { + ensurePartialErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialErrors_); + onChanged(); + } else { + partialErrorsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPartialErrors() { + if (partialErrorsBuilder_ == null) { + partialErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + partialErrorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePartialErrors(int index) { + if (partialErrorsBuilder_ == null) { + ensurePartialErrorsIsMutable(); + partialErrors_.remove(index); + onChanged(); + } else { + partialErrorsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder getPartialErrorsBuilder(int index) { + return internalGetPartialErrorsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.StatusOrBuilder getPartialErrorsOrBuilder(int index) { + if (partialErrorsBuilder_ == null) { + return partialErrors_.get(index); + } else { + return partialErrorsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPartialErrorsOrBuilderList() { + if (partialErrorsBuilder_ != null) { + return partialErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialErrors_); + } + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder addPartialErrorsBuilder() { + return internalGetPartialErrorsFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder addPartialErrorsBuilder(int index) { + return internalGetPartialErrorsFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Error messages from the resource generation process.
+     * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPartialErrorsBuilderList() { + return internalGetPartialErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetPartialErrorsFieldBuilder() { + if (partialErrorsBuilder_ == null) { + partialErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + partialErrors_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + partialErrors_ = null; + } + return partialErrorsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateAppResourceOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceOperationMetadataOrBuilder.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..b6e3c459fcbe --- /dev/null +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceOperationMetadataOrBuilder.java @@ -0,0 +1,258 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/ces/v1beta/agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.ces.v1beta; + +@com.google.protobuf.Generated +public interface GenerateAppResourceOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The type of the operation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for generationType. + */ + int getGenerationTypeValue(); + + /** + * + * + *
+   * Output only. The type of the operation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType generation_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The generationType. + */ + com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata.GenerationType + getGenerationType(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + java.lang.String getMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The resource name of the app that the operation is associated
+   * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+   * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. The resource name of the app that the operation is associated
+   * with. Format: `projects/{project}/locations/{location}/apps/{app}`.
+   * 
+ * + * string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPartialErrorsList(); + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.Status getPartialErrors(int index); + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPartialErrorsCount(); + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPartialErrorsOrBuilderList(); + + /** + * + * + *
+   * Output only. Error messages from the resource generation process.
+   * 
+ * + * + * repeated .google.rpc.Status partial_errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.StatusOrBuilder getPartialErrorsOrBuilder(int index); +} diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceRequest.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceRequest.java new file mode 100644 index 000000000000..4f0a6ed6c095 --- /dev/null +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceRequest.java @@ -0,0 +1,14450 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/ces/v1beta/agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.ces.v1beta; + +/** + * + * + *
+ * Request message for
+ * [AgentService.GenerateAppResource][google.cloud.ces.v1beta.AgentService.GenerateAppResource].
+ * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest} + */ +@com.google.protobuf.Generated +public final class GenerateAppResourceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest) + GenerateAppResourceRequestOrBuilder { + 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= */ "", + "GenerateAppResourceRequest"); + } + + // Use GenerateAppResourceRequest.newBuilder() to construct. + private GenerateAppResourceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GenerateAppResourceRequest() { + parent_ = ""; + refineInstructions_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.Builder.class); + } + + public interface RefineInstructionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The first character (inclusive) of the text to refine.
+     * 
+ * + * int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startIndex. + */ + long getStartIndex(); + + /** + * + * + *
+     * Required. The last character (inclusive) of the text to refine.
+     * 
+ * + * int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endIndex. + */ + long getEndIndex(); + + /** + * + * + *
+     * Required. The field of the resource being refined. Only one field is
+     * allowed per RefineInstructions. If refining agent instructions, the field
+     * mask should be "instructions".
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fieldMask field is set. + */ + boolean hasFieldMask(); + + /** + * + * + *
+     * Required. The field of the resource being refined. Only one field is
+     * allowed per RefineInstructions. If refining agent instructions, the field
+     * mask should be "instructions".
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fieldMask. + */ + com.google.protobuf.FieldMask getFieldMask(); + + /** + * + * + *
+     * Required. The field of the resource being refined. Only one field is
+     * allowed per RefineInstructions. If refining agent instructions, the field
+     * mask should be "instructions".
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder(); + + /** + * + * + *
+     * Required. The instructions to refine the resource.
+     * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instructions. + */ + java.lang.String getInstructions(); + + /** + * + * + *
+     * Required. The instructions to refine the resource.
+     * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instructions. + */ + com.google.protobuf.ByteString getInstructionsBytes(); + } + + /** + * + * + *
+   * The instructions to be used to refine a part of the resource. The part of
+   * the resource can be specified  with a start index, end index and a field
+   * mask. For example, if you want to refine a part of the agent instructions
+   * you can specify the index of the first character of the instructions, the
+   * index of the last character of the instructions and the field mask as
+   * "instructions".
+   * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions} + */ + public static final class RefineInstructions extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions) + RefineInstructionsOrBuilder { + 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= */ "", + "RefineInstructions"); + } + + // Use RefineInstructions.newBuilder() to construct. + private RefineInstructions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RefineInstructions() { + instructions_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_RefineInstructions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_RefineInstructions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder + .class); + } + + private int bitField0_; + public static final int START_INDEX_FIELD_NUMBER = 1; + private long startIndex_ = 0L; + + /** + * + * + *
+     * Required. The first character (inclusive) of the text to refine.
+     * 
+ * + * int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startIndex. + */ + @java.lang.Override + public long getStartIndex() { + return startIndex_; + } + + public static final int END_INDEX_FIELD_NUMBER = 2; + private long endIndex_ = 0L; + + /** + * + * + *
+     * Required. The last character (inclusive) of the text to refine.
+     * 
+ * + * int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endIndex. + */ + @java.lang.Override + public long getEndIndex() { + return endIndex_; + } + + public static final int FIELD_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask fieldMask_; + + /** + * + * + *
+     * Required. The field of the resource being refined. Only one field is
+     * allowed per RefineInstructions. If refining agent instructions, the field
+     * mask should be "instructions".
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fieldMask field is set. + */ + @java.lang.Override + public boolean hasFieldMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The field of the resource being refined. Only one field is
+     * allowed per RefineInstructions. If refining agent instructions, the field
+     * mask should be "instructions".
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fieldMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getFieldMask() { + return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; + } + + /** + * + * + *
+     * Required. The field of the resource being refined. Only one field is
+     * allowed per RefineInstructions. If refining agent instructions, the field
+     * mask should be "instructions".
+     * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { + return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; + } + + public static final int INSTRUCTIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object instructions_ = ""; + + /** + * + * + *
+     * Required. The instructions to refine the resource.
+     * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instructions. + */ + @java.lang.Override + public java.lang.String getInstructions() { + java.lang.Object ref = instructions_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructions_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The instructions to refine the resource.
+     * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instructions. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstructionsBytes() { + java.lang.Object ref = instructions_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructions_ = 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 (startIndex_ != 0L) { + output.writeInt64(1, startIndex_); + } + if (endIndex_ != 0L) { + output.writeInt64(2, endIndex_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getFieldMask()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instructions_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, instructions_); + } + 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_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFieldMask()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instructions_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, instructions_); + } + 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.ces.v1beta.GenerateAppResourceRequest.RefineInstructions)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions) obj; + + if (getStartIndex() != other.getStartIndex()) return false; + if (getEndIndex() != other.getEndIndex()) return false; + if (hasFieldMask() != other.hasFieldMask()) return false; + if (hasFieldMask()) { + if (!getFieldMask().equals(other.getFieldMask())) return false; + } + if (!getInstructions().equals(other.getInstructions())) 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 (hasFieldMask()) { + hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER; + hash = (53 * hash) + getFieldMask().hashCode(); + } + hash = (37 * hash) + INSTRUCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getInstructions().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + 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.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + 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.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + 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.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + 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.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + 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.ces.v1beta.GenerateAppResourceRequest.RefineInstructions 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 instructions to be used to refine a part of the resource. The part of
+     * the resource can be specified  with a start index, end index and a field
+     * mask. For example, if you want to refine a part of the agent instructions
+     * you can specify the index of the first character of the instructions, the
+     * index of the last character of the instructions and the field mask as
+     * "instructions".
+     * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_RefineInstructions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_RefineInstructions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder + .class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFieldMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startIndex_ = 0L; + endIndex_ = 0L; + fieldMask_ = null; + if (fieldMaskBuilder_ != null) { + fieldMaskBuilder_.dispose(); + fieldMaskBuilder_ = null; + } + instructions_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_RefineInstructions_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startIndex_ = startIndex_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endIndex_ = endIndex_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fieldMask_ = fieldMaskBuilder_ == null ? fieldMask_ : fieldMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.instructions_ = instructions_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + .getDefaultInstance()) return this; + if (other.getStartIndex() != 0L) { + setStartIndex(other.getStartIndex()); + } + if (other.getEndIndex() != 0L) { + setEndIndex(other.getEndIndex()); + } + if (other.hasFieldMask()) { + mergeFieldMask(other.getFieldMask()); + } + if (!other.getInstructions().isEmpty()) { + instructions_ = other.instructions_; + 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 8: + { + startIndex_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + endIndex_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetFieldMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + instructions_ = 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 long startIndex_; + + /** + * + * + *
+       * Required. The first character (inclusive) of the text to refine.
+       * 
+ * + * int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startIndex. + */ + @java.lang.Override + public long getStartIndex() { + return startIndex_; + } + + /** + * + * + *
+       * Required. The first character (inclusive) of the text to refine.
+       * 
+ * + * 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) { + + startIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The first character (inclusive) of the text to refine.
+       * 
+ * + * 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; + } + + private long endIndex_; + + /** + * + * + *
+       * Required. The last character (inclusive) of the text to refine.
+       * 
+ * + * int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endIndex. + */ + @java.lang.Override + public long getEndIndex() { + return endIndex_; + } + + /** + * + * + *
+       * Required. The last character (inclusive) of the text to refine.
+       * 
+ * + * 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) { + + endIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The last character (inclusive) of the text to refine.
+       * 
+ * + * 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; + } + + private com.google.protobuf.FieldMask fieldMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + fieldMaskBuilder_; + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fieldMask field is set. + */ + public boolean hasFieldMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fieldMask. + */ + public com.google.protobuf.FieldMask getFieldMask() { + if (fieldMaskBuilder_ == null) { + return fieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : fieldMask_; + } else { + return fieldMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFieldMask(com.google.protobuf.FieldMask value) { + if (fieldMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldMask_ = value; + } else { + fieldMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (fieldMaskBuilder_ == null) { + fieldMask_ = builderForValue.build(); + } else { + fieldMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { + if (fieldMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && fieldMask_ != null + && fieldMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getFieldMaskBuilder().mergeFrom(value); + } else { + fieldMask_ = value; + } + } else { + fieldMaskBuilder_.mergeFrom(value); + } + if (fieldMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFieldMask() { + bitField0_ = (bitField0_ & ~0x00000004); + fieldMask_ = null; + if (fieldMaskBuilder_ != null) { + fieldMaskBuilder_.dispose(); + fieldMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetFieldMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { + if (fieldMaskBuilder_ != null) { + return fieldMaskBuilder_.getMessageOrBuilder(); + } else { + return fieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : fieldMask_; + } + } + + /** + * + * + *
+       * Required. The field of the resource being refined. Only one field is
+       * allowed per RefineInstructions. If refining agent instructions, the field
+       * mask should be "instructions".
+       * 
+ * + * .google.protobuf.FieldMask field_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetFieldMaskFieldBuilder() { + if (fieldMaskBuilder_ == null) { + fieldMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getFieldMask(), getParentForChildren(), isClean()); + fieldMask_ = null; + } + return fieldMaskBuilder_; + } + + private java.lang.Object instructions_ = ""; + + /** + * + * + *
+       * Required. The instructions to refine the resource.
+       * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instructions. + */ + public java.lang.String getInstructions() { + java.lang.Object ref = instructions_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructions_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The instructions to refine the resource.
+       * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instructions. + */ + public com.google.protobuf.ByteString getInstructionsBytes() { + java.lang.Object ref = instructions_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructions_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The instructions to refine the resource.
+       * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instructions to set. + * @return This builder for chaining. + */ + public Builder setInstructions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instructions_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The instructions to refine the resource.
+       * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstructions() { + instructions_ = getDefaultInstance().getInstructions(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The instructions to refine the resource.
+       * 
+ * + * string instructions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instructions to set. + * @return This builder for chaining. + */ + public Builder setInstructionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instructions_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RefineInstructions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ToolGenerationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The context which describes the tool to be generated. This can
+     * be empty if the tool request & response are provided.
+     * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The context. + */ + java.lang.String getContext(); + + /** + * + * + *
+     * Optional. The context which describes the tool to be generated. This can
+     * be empty if the tool request & response are provided.
+     * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for context. + */ + com.google.protobuf.ByteString getContextBytes(); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFileContextsList(); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.FileContext getFileContexts(int index); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFileContextsCount(); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getFileContextsOrBuilderList(); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.FileContextOrBuilder getFileContextsOrBuilder(int index); + + /** + * + * + *
+     * Optional. The configuration to be used to generate an Open API schema.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the openApiToolsetGenerationConfig field is set. + */ + boolean hasOpenApiToolsetGenerationConfig(); + + /** + * + * + *
+     * Optional. The configuration to be used to generate an Open API schema.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The openApiToolsetGenerationConfig. + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + getOpenApiToolsetGenerationConfig(); + + /** + * + * + *
+     * Optional. The configuration to be used to generate an Open API schema.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfigOrBuilder + getOpenApiToolsetGenerationConfigOrBuilder(); + } + + /** + * + * + *
+   * The configuration to be used to generate a tool.
+   * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig} + */ + public static final class ToolGenerationConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig) + ToolGenerationConfigOrBuilder { + 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= */ "", + "ToolGenerationConfig"); + } + + // Use ToolGenerationConfig.newBuilder() to construct. + private ToolGenerationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ToolGenerationConfig() { + context_ = ""; + fileContexts_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.Builder + .class); + } + + public interface OpenApiToolsetGenerationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The base uri of the tool.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+       * Required. The base uri of the tool.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig> + getOperationGenerationConfigsList(); + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + getOperationGenerationConfigs(int index); + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getOperationGenerationConfigsCount(); + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder> + getOperationGenerationConfigsOrBuilderList(); + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder + getOperationGenerationConfigsOrBuilder(int index); + } + + /** + * + * + *
+     * The configuration to be used to generate an Open API schema.
+     * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig} + */ + public static final class OpenApiToolsetGenerationConfig + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig) + OpenApiToolsetGenerationConfigOrBuilder { + 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= */ "", + "OpenApiToolsetGenerationConfig"); + } + + // Use OpenApiToolsetGenerationConfig.newBuilder() to construct. + private OpenApiToolsetGenerationConfig( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenApiToolsetGenerationConfig() { + uri_ = ""; + operationGenerationConfigs_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.Builder.class); + } + + public interface OperationGenerationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The uri of the tool. This should include query and path
+         * parameters if any.
+         * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The method. + */ + java.lang.String getMethod(); + + /** + * + * + *
+         * Required. The uri of the tool. This should include query and path
+         * parameters if any.
+         * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for method. + */ + com.google.protobuf.ByteString getMethodBytes(); + + /** + * + * + *
+         * Required. The path of the tool to be appended to the base uri. This
+         * should include query and path parameters if any.
+         * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The path. + */ + java.lang.String getPath(); + + /** + * + * + *
+         * Required. The path of the tool to be appended to the base uri. This
+         * should include query and path parameters if any.
+         * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+         * Required. A sample request to the tool in JSON format. Skip if the
+         * tool does not support request body.
+         * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The requestJson. + */ + java.lang.String getRequestJson(); + + /** + * + * + *
+         * Required. A sample request to the tool in JSON format. Skip if the
+         * tool does not support request body.
+         * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for requestJson. + */ + com.google.protobuf.ByteString getRequestJsonBytes(); + + /** + * + * + *
+         * Required. A sample response from the tool in JSON format.
+         * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseJson. + */ + java.lang.String getResponseJson(); + + /** + * + * + *
+         * Required. A sample response from the tool in JSON format.
+         * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseJson. + */ + com.google.protobuf.ByteString getResponseJsonBytes(); + } + + /** + * + * + *
+       * The configuration to be used to generate an operation in the Open API
+       * schema.
+       * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig} + */ + public static final class OperationGenerationConfig + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig) + OperationGenerationConfigOrBuilder { + 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= */ "", + "OperationGenerationConfig"); + } + + // Use OperationGenerationConfig.newBuilder() to construct. + private OperationGenerationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationGenerationConfig() { + method_ = ""; + path_ = ""; + requestJson_ = ""; + responseJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_OperationGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_OperationGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder.class); + } + + public static final int METHOD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object method_ = ""; + + /** + * + * + *
+         * Required. The uri of the tool. This should include query and path
+         * parameters if any.
+         * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } + } + + /** + * + * + *
+         * Required. The uri of the tool. This should include query and path
+         * parameters if any.
+         * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + + /** + * + * + *
+         * Required. The path of the tool to be appended to the base uri. This
+         * should include query and path parameters if any.
+         * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + + /** + * + * + *
+         * Required. The path of the tool to be appended to the base uri. This
+         * should include query and path parameters if any.
+         * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_JSON_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestJson_ = ""; + + /** + * + * + *
+         * Required. A sample request to the tool in JSON format. Skip if the
+         * tool does not support request body.
+         * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The requestJson. + */ + @java.lang.Override + public java.lang.String getRequestJson() { + java.lang.Object ref = requestJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestJson_ = s; + return s; + } + } + + /** + * + * + *
+         * Required. A sample request to the tool in JSON format. Skip if the
+         * tool does not support request body.
+         * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for requestJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestJsonBytes() { + java.lang.Object ref = requestJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSE_JSON_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseJson_ = ""; + + /** + * + * + *
+         * Required. A sample response from the tool in JSON format.
+         * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseJson. + */ + @java.lang.Override + public java.lang.String getResponseJson() { + java.lang.Object ref = responseJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseJson_ = s; + return s; + } + } + + /** + * + * + *
+         * Required. A sample response from the tool in JSON format.
+         * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseJsonBytes() { + java.lang.Object ref = responseJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseJson_ = 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(method_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, method_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, path_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestJson_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, responseJson_); + } + 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(method_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, method_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, path_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestJson_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, responseJson_); + } + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig) + obj; + + if (!getMethod().equals(other.getMethod())) return false; + if (!getPath().equals(other.getPath())) return false; + if (!getRequestJson().equals(other.getRequestJson())) return false; + if (!getResponseJson().equals(other.getResponseJson())) 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) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + REQUEST_JSON_FIELD_NUMBER; + hash = (53 * hash) + getRequestJson().hashCode(); + hash = (37 * hash) + RESPONSE_JSON_FIELD_NUMBER; + hash = (53 * hash) + getResponseJson().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + 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 configuration to be used to generate an operation in the Open API
+         * schema.
+         * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_OperationGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_OperationGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder.class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + method_ = ""; + path_ = ""; + requestJson_ = ""; + responseJson_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_OperationGenerationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.path_ = path_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestJson_ = requestJson_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.responseJson_ = responseJson_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.getDefaultInstance()) + return this; + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRequestJson().isEmpty()) { + requestJson_ = other.requestJson_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getResponseJson().isEmpty()) { + responseJson_ = other.responseJson_; + 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: + { + method_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + responseJson_ = 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 method_ = ""; + + /** + * + * + *
+           * Required. The uri of the tool. This should include query and path
+           * parameters if any.
+           * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+           * Required. The uri of the tool. This should include query and path
+           * parameters if any.
+           * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for method. + */ + public com.google.protobuf.ByteString getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+           * Required. The uri of the tool. This should include query and path
+           * parameters if any.
+           * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+           * Required. The uri of the tool. This should include query and path
+           * parameters if any.
+           * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMethod() { + method_ = getDefaultInstance().getMethod(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+           * Required. The uri of the tool. This should include query and path
+           * parameters if any.
+           * 
+ * + * string method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + + /** + * + * + *
+           * Required. The path of the tool to be appended to the base uri. This
+           * should include query and path parameters if any.
+           * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+           * Required. The path of the tool to be appended to the base uri. This
+           * should include query and path parameters if any.
+           * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+           * Required. The path of the tool to be appended to the base uri. This
+           * should include query and path parameters if any.
+           * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+           * Required. The path of the tool to be appended to the base uri. This
+           * should include query and path parameters if any.
+           * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+           * Required. The path of the tool to be appended to the base uri. This
+           * should include query and path parameters if any.
+           * 
+ * + * string path = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestJson_ = ""; + + /** + * + * + *
+           * Required. A sample request to the tool in JSON format. Skip if the
+           * tool does not support request body.
+           * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The requestJson. + */ + public java.lang.String getRequestJson() { + java.lang.Object ref = requestJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+           * Required. A sample request to the tool in JSON format. Skip if the
+           * tool does not support request body.
+           * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for requestJson. + */ + public com.google.protobuf.ByteString getRequestJsonBytes() { + java.lang.Object ref = requestJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+           * Required. A sample request to the tool in JSON format. Skip if the
+           * tool does not support request body.
+           * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The requestJson to set. + * @return This builder for chaining. + */ + public Builder setRequestJson(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestJson_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+           * Required. A sample request to the tool in JSON format. Skip if the
+           * tool does not support request body.
+           * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRequestJson() { + requestJson_ = getDefaultInstance().getRequestJson(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+           * Required. A sample request to the tool in JSON format. Skip if the
+           * tool does not support request body.
+           * 
+ * + * string request_json = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for requestJson to set. + * @return This builder for chaining. + */ + public Builder setRequestJsonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestJson_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object responseJson_ = ""; + + /** + * + * + *
+           * Required. A sample response from the tool in JSON format.
+           * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The responseJson. + */ + public java.lang.String getResponseJson() { + java.lang.Object ref = responseJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+           * Required. A sample response from the tool in JSON format.
+           * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for responseJson. + */ + public com.google.protobuf.ByteString getResponseJsonBytes() { + java.lang.Object ref = responseJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+           * Required. A sample response from the tool in JSON format.
+           * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The responseJson to set. + * @return This builder for chaining. + */ + public Builder setResponseJson(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseJson_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+           * Required. A sample response from the tool in JSON format.
+           * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResponseJson() { + responseJson_ = getDefaultInstance().getResponseJson(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+           * Required. A sample response from the tool in JSON format.
+           * 
+ * + * string response_json = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for responseJson to set. + * @return This builder for chaining. + */ + public Builder setResponseJsonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseJson_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationGenerationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+       * Required. The base uri of the tool.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+       * Required. The base uri of the tool.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 OPERATION_GENERATION_CONFIGS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig> + operationGenerationConfigs_; + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig> + getOperationGenerationConfigsList() { + return operationGenerationConfigs_; + } + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder> + getOperationGenerationConfigsOrBuilderList() { + return operationGenerationConfigs_; + } + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getOperationGenerationConfigsCount() { + return operationGenerationConfigs_.size(); + } + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + getOperationGenerationConfigs(int index) { + return operationGenerationConfigs_.get(index); + } + + /** + * + * + *
+       * Required. The list of operations to be added to the Open API schema.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder + getOperationGenerationConfigsOrBuilder(int index) { + return operationGenerationConfigs_.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(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + for (int i = 0; i < operationGenerationConfigs_.size(); i++) { + output.writeMessage(2, operationGenerationConfigs_.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(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + for (int i = 0; i < operationGenerationConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, operationGenerationConfigs_.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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig) + obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getOperationGenerationConfigsList().equals(other.getOperationGenerationConfigsList())) + 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(); + if (getOperationGenerationConfigsCount() > 0) { + hash = (37 * hash) + OPERATION_GENERATION_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getOperationGenerationConfigsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + 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 configuration to be used to generate an Open API schema.
+       * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.Builder.class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + if (operationGenerationConfigsBuilder_ == null) { + operationGenerationConfigs_ = java.util.Collections.emptyList(); + } else { + operationGenerationConfigs_ = null; + operationGenerationConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_OpenApiToolsetGenerationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + result) { + if (operationGenerationConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + operationGenerationConfigs_ = + java.util.Collections.unmodifiableList(operationGenerationConfigs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.operationGenerationConfigs_ = operationGenerationConfigs_; + } else { + result.operationGenerationConfigs_ = operationGenerationConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (operationGenerationConfigsBuilder_ == null) { + if (!other.operationGenerationConfigs_.isEmpty()) { + if (operationGenerationConfigs_.isEmpty()) { + operationGenerationConfigs_ = other.operationGenerationConfigs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.addAll(other.operationGenerationConfigs_); + } + onChanged(); + } + } else { + if (!other.operationGenerationConfigs_.isEmpty()) { + if (operationGenerationConfigsBuilder_.isEmpty()) { + operationGenerationConfigsBuilder_.dispose(); + operationGenerationConfigsBuilder_ = null; + operationGenerationConfigs_ = other.operationGenerationConfigs_; + bitField0_ = (bitField0_ & ~0x00000002); + operationGenerationConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetOperationGenerationConfigsFieldBuilder() + : null; + } else { + operationGenerationConfigsBuilder_.addAllMessages( + other.operationGenerationConfigs_); + } + } + } + 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 18: + { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + m = + input.readMessage( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .ToolGenerationConfig.OpenApiToolsetGenerationConfig + .OperationGenerationConfig.parser(), + extensionRegistry); + if (operationGenerationConfigsBuilder_ == null) { + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.add(m); + } else { + operationGenerationConfigsBuilder_.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.lang.Object uri_ = ""; + + /** + * + * + *
+         * Required. The base uri of the tool.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+         * Required. The base uri of the tool.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+         * Required. The base uri of the tool.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + /** + * + * + *
+         * Required. The base uri of the tool.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * Required. The base uri of the tool.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.util.List< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig> + operationGenerationConfigs_ = java.util.Collections.emptyList(); + + private void ensureOperationGenerationConfigsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + operationGenerationConfigs_ = + new java.util.ArrayList< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig>( + operationGenerationConfigs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder> + operationGenerationConfigsBuilder_; + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig> + getOperationGenerationConfigsList() { + if (operationGenerationConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(operationGenerationConfigs_); + } else { + return operationGenerationConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getOperationGenerationConfigsCount() { + if (operationGenerationConfigsBuilder_ == null) { + return operationGenerationConfigs_.size(); + } else { + return operationGenerationConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + getOperationGenerationConfigs(int index) { + if (operationGenerationConfigsBuilder_ == null) { + return operationGenerationConfigs_.get(index); + } else { + return operationGenerationConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOperationGenerationConfigs( + int index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + value) { + if (operationGenerationConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.set(index, value); + onChanged(); + } else { + operationGenerationConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOperationGenerationConfigs( + int index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder + builderForValue) { + if (operationGenerationConfigsBuilder_ == null) { + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + operationGenerationConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addOperationGenerationConfigs( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + value) { + if (operationGenerationConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.add(value); + onChanged(); + } else { + operationGenerationConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addOperationGenerationConfigs( + int index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + value) { + if (operationGenerationConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.add(index, value); + onChanged(); + } else { + operationGenerationConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addOperationGenerationConfigs( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder + builderForValue) { + if (operationGenerationConfigsBuilder_ == null) { + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.add(builderForValue.build()); + onChanged(); + } else { + operationGenerationConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addOperationGenerationConfigs( + int index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder + builderForValue) { + if (operationGenerationConfigsBuilder_ == null) { + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + operationGenerationConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllOperationGenerationConfigs( + java.lang.Iterable< + ? extends + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig> + values) { + if (operationGenerationConfigsBuilder_ == null) { + ensureOperationGenerationConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, operationGenerationConfigs_); + onChanged(); + } else { + operationGenerationConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOperationGenerationConfigs() { + if (operationGenerationConfigsBuilder_ == null) { + operationGenerationConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + operationGenerationConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeOperationGenerationConfigs(int index) { + if (operationGenerationConfigsBuilder_ == null) { + ensureOperationGenerationConfigsIsMutable(); + operationGenerationConfigs_.remove(index); + onChanged(); + } else { + operationGenerationConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder + getOperationGenerationConfigsBuilder(int index) { + return internalGetOperationGenerationConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder + getOperationGenerationConfigsOrBuilder(int index) { + if (operationGenerationConfigsBuilder_ == null) { + return operationGenerationConfigs_.get(index); + } else { + return operationGenerationConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder> + getOperationGenerationConfigsOrBuilderList() { + if (operationGenerationConfigsBuilder_ != null) { + return operationGenerationConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(operationGenerationConfigs_); + } + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder + addOperationGenerationConfigsBuilder() { + return internalGetOperationGenerationConfigsFieldBuilder() + .addBuilder( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + .getDefaultInstance()); + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder + addOperationGenerationConfigsBuilder(int index) { + return internalGetOperationGenerationConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig + .getDefaultInstance()); + } + + /** + * + * + *
+         * Required. The list of operations to be added to the Open API schema.
+         * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig operation_generation_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder> + getOperationGenerationConfigsBuilderList() { + return internalGetOperationGenerationConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder> + internalGetOperationGenerationConfigsFieldBuilder() { + if (operationGenerationConfigsBuilder_ == null) { + operationGenerationConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.OperationGenerationConfigOrBuilder>( + operationGenerationConfigs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + operationGenerationConfigs_ = null; + } + return operationGenerationConfigsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .ToolGenerationConfig.OpenApiToolsetGenerationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenApiToolsetGenerationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CONTEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object context_ = ""; + + /** + * + * + *
+     * Optional. The context which describes the tool to be generated. This can
+     * be empty if the tool request & response are provided.
+     * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The context. + */ + @java.lang.Override + public java.lang.String getContext() { + java.lang.Object ref = context_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + context_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The context which describes the tool to be generated. This can
+     * be empty if the tool request & response are provided.
+     * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for context. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContextBytes() { + java.lang.Object ref = context_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + context_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_CONTEXTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List fileContexts_; + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getFileContextsList() { + return fileContexts_; + } + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getFileContextsOrBuilderList() { + return fileContexts_; + } + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFileContextsCount() { + return fileContexts_.size(); + } + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext getFileContexts(int index) { + return fileContexts_.get(index); + } + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContextOrBuilder getFileContextsOrBuilder(int index) { + return fileContexts_.get(index); + } + + public static final int OPEN_API_TOOLSET_GENERATION_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + openApiToolsetGenerationConfig_; + + /** + * + * + *
+     * Optional. The configuration to be used to generate an Open API schema.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the openApiToolsetGenerationConfig field is set. + */ + @java.lang.Override + public boolean hasOpenApiToolsetGenerationConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate an Open API schema.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The openApiToolsetGenerationConfig. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + getOpenApiToolsetGenerationConfig() { + return openApiToolsetGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.getDefaultInstance() + : openApiToolsetGenerationConfig_; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate an Open API schema.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfigOrBuilder + getOpenApiToolsetGenerationConfigOrBuilder() { + return openApiToolsetGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.getDefaultInstance() + : openApiToolsetGenerationConfig_; + } + + 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(context_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, context_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getOpenApiToolsetGenerationConfig()); + } + for (int i = 0; i < fileContexts_.size(); i++) { + output.writeMessage(3, fileContexts_.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(context_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, context_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getOpenApiToolsetGenerationConfig()); + } + for (int i = 0; i < fileContexts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, fileContexts_.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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig) obj; + + if (!getContext().equals(other.getContext())) return false; + if (!getFileContextsList().equals(other.getFileContextsList())) return false; + if (hasOpenApiToolsetGenerationConfig() != other.hasOpenApiToolsetGenerationConfig()) + return false; + if (hasOpenApiToolsetGenerationConfig()) { + if (!getOpenApiToolsetGenerationConfig().equals(other.getOpenApiToolsetGenerationConfig())) + 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) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + if (getFileContextsCount() > 0) { + hash = (37 * hash) + FILE_CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getFileContextsList().hashCode(); + } + if (hasOpenApiToolsetGenerationConfig()) { + hash = (37 * hash) + OPEN_API_TOOLSET_GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOpenApiToolsetGenerationConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig 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 configuration to be used to generate a tool.
+     * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFileContextsFieldBuilder(); + internalGetOpenApiToolsetGenerationConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + context_ = ""; + if (fileContextsBuilder_ == null) { + fileContexts_ = java.util.Collections.emptyList(); + } else { + fileContexts_ = null; + fileContextsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + openApiToolsetGenerationConfig_ = null; + if (openApiToolsetGenerationConfigBuilder_ != null) { + openApiToolsetGenerationConfigBuilder_.dispose(); + openApiToolsetGenerationConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_ToolGenerationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig result) { + if (fileContextsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + fileContexts_ = java.util.Collections.unmodifiableList(fileContexts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fileContexts_ = fileContexts_; + } else { + result.fileContexts_ = fileContextsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.context_ = context_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.openApiToolsetGenerationConfig_ = + openApiToolsetGenerationConfigBuilder_ == null + ? openApiToolsetGenerationConfig_ + : openApiToolsetGenerationConfigBuilder_.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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .getDefaultInstance()) return this; + if (!other.getContext().isEmpty()) { + context_ = other.context_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (fileContextsBuilder_ == null) { + if (!other.fileContexts_.isEmpty()) { + if (fileContexts_.isEmpty()) { + fileContexts_ = other.fileContexts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFileContextsIsMutable(); + fileContexts_.addAll(other.fileContexts_); + } + onChanged(); + } + } else { + if (!other.fileContexts_.isEmpty()) { + if (fileContextsBuilder_.isEmpty()) { + fileContextsBuilder_.dispose(); + fileContextsBuilder_ = null; + fileContexts_ = other.fileContexts_; + bitField0_ = (bitField0_ & ~0x00000002); + fileContextsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFileContextsFieldBuilder() + : null; + } else { + fileContextsBuilder_.addAllMessages(other.fileContexts_); + } + } + } + if (other.hasOpenApiToolsetGenerationConfig()) { + mergeOpenApiToolsetGenerationConfig(other.getOpenApiToolsetGenerationConfig()); + } + 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: + { + context_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetOpenApiToolsetGenerationConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + com.google.cloud.ces.v1beta.FileContext m = + input.readMessage( + com.google.cloud.ces.v1beta.FileContext.parser(), extensionRegistry); + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.add(m); + } else { + fileContextsBuilder_.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 java.lang.Object context_ = ""; + + /** + * + * + *
+       * Optional. The context which describes the tool to be generated. This can
+       * be empty if the tool request & response are provided.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The context. + */ + public java.lang.String getContext() { + java.lang.Object ref = context_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + context_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The context which describes the tool to be generated. This can
+       * be empty if the tool request & response are provided.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for context. + */ + public com.google.protobuf.ByteString getContextBytes() { + java.lang.Object ref = context_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + context_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The context which describes the tool to be generated. This can
+       * be empty if the tool request & response are provided.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The context to set. + * @return This builder for chaining. + */ + public Builder setContext(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The context which describes the tool to be generated. This can
+       * be empty if the tool request & response are provided.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearContext() { + context_ = getDefaultInstance().getContext(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The context which describes the tool to be generated. This can
+       * be empty if the tool request & response are provided.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for context to set. + * @return This builder for chaining. + */ + public Builder setContextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + context_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List fileContexts_ = + java.util.Collections.emptyList(); + + private void ensureFileContextsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fileContexts_ = + new java.util.ArrayList(fileContexts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.FileContext, + com.google.cloud.ces.v1beta.FileContext.Builder, + com.google.cloud.ces.v1beta.FileContextOrBuilder> + fileContextsBuilder_; + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getFileContextsList() { + if (fileContextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileContexts_); + } else { + return fileContextsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getFileContextsCount() { + if (fileContextsBuilder_ == null) { + return fileContexts_.size(); + } else { + return fileContextsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext getFileContexts(int index) { + if (fileContextsBuilder_ == null) { + return fileContexts_.get(index); + } else { + return fileContextsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFileContexts(int index, com.google.cloud.ces.v1beta.FileContext value) { + if (fileContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileContextsIsMutable(); + fileContexts_.set(index, value); + onChanged(); + } else { + fileContextsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFileContexts( + int index, com.google.cloud.ces.v1beta.FileContext.Builder builderForValue) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.set(index, builderForValue.build()); + onChanged(); + } else { + fileContextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFileContexts(com.google.cloud.ces.v1beta.FileContext value) { + if (fileContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileContextsIsMutable(); + fileContexts_.add(value); + onChanged(); + } else { + fileContextsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFileContexts(int index, com.google.cloud.ces.v1beta.FileContext value) { + if (fileContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileContextsIsMutable(); + fileContexts_.add(index, value); + onChanged(); + } else { + fileContextsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFileContexts( + com.google.cloud.ces.v1beta.FileContext.Builder builderForValue) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.add(builderForValue.build()); + onChanged(); + } else { + fileContextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFileContexts( + int index, com.google.cloud.ces.v1beta.FileContext.Builder builderForValue) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.add(index, builderForValue.build()); + onChanged(); + } else { + fileContextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllFileContexts( + java.lang.Iterable values) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileContexts_); + onChanged(); + } else { + fileContextsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFileContexts() { + if (fileContextsBuilder_ == null) { + fileContexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + fileContextsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeFileContexts(int index) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.remove(index); + onChanged(); + } else { + fileContextsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext.Builder getFileContextsBuilder(int index) { + return internalGetFileContextsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContextOrBuilder getFileContextsOrBuilder(int index) { + if (fileContextsBuilder_ == null) { + return fileContexts_.get(index); + } else { + return fileContextsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFileContextsOrBuilderList() { + if (fileContextsBuilder_ != null) { + return fileContextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileContexts_); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext.Builder addFileContextsBuilder() { + return internalGetFileContextsFieldBuilder() + .addBuilder(com.google.cloud.ces.v1beta.FileContext.getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext.Builder addFileContextsBuilder(int index) { + return internalGetFileContextsFieldBuilder() + .addBuilder(index, com.google.cloud.ces.v1beta.FileContext.getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFileContextsBuilderList() { + return internalGetFileContextsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.FileContext, + com.google.cloud.ces.v1beta.FileContext.Builder, + com.google.cloud.ces.v1beta.FileContextOrBuilder> + internalGetFileContextsFieldBuilder() { + if (fileContextsBuilder_ == null) { + fileContextsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.FileContext, + com.google.cloud.ces.v1beta.FileContext.Builder, + com.google.cloud.ces.v1beta.FileContextOrBuilder>( + fileContexts_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + fileContexts_ = null; + } + return fileContextsBuilder_; + } + + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + openApiToolsetGenerationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfigOrBuilder> + openApiToolsetGenerationConfigBuilder_; + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the openApiToolsetGenerationConfig field is set. + */ + public boolean hasOpenApiToolsetGenerationConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The openApiToolsetGenerationConfig. + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + getOpenApiToolsetGenerationConfig() { + if (openApiToolsetGenerationConfigBuilder_ == null) { + return openApiToolsetGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.getDefaultInstance() + : openApiToolsetGenerationConfig_; + } else { + return openApiToolsetGenerationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOpenApiToolsetGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + value) { + if (openApiToolsetGenerationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + openApiToolsetGenerationConfig_ = value; + } else { + openApiToolsetGenerationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOpenApiToolsetGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.Builder + builderForValue) { + if (openApiToolsetGenerationConfigBuilder_ == null) { + openApiToolsetGenerationConfig_ = builderForValue.build(); + } else { + openApiToolsetGenerationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOpenApiToolsetGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig + value) { + if (openApiToolsetGenerationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && openApiToolsetGenerationConfig_ != null + && openApiToolsetGenerationConfig_ + != com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.getDefaultInstance()) { + getOpenApiToolsetGenerationConfigBuilder().mergeFrom(value); + } else { + openApiToolsetGenerationConfig_ = value; + } + } else { + openApiToolsetGenerationConfigBuilder_.mergeFrom(value); + } + if (openApiToolsetGenerationConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOpenApiToolsetGenerationConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + openApiToolsetGenerationConfig_ = null; + if (openApiToolsetGenerationConfigBuilder_ != null) { + openApiToolsetGenerationConfigBuilder_.dispose(); + openApiToolsetGenerationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.Builder + getOpenApiToolsetGenerationConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetOpenApiToolsetGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfigOrBuilder + getOpenApiToolsetGenerationConfigOrBuilder() { + if (openApiToolsetGenerationConfigBuilder_ != null) { + return openApiToolsetGenerationConfigBuilder_.getMessageOrBuilder(); + } else { + return openApiToolsetGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.getDefaultInstance() + : openApiToolsetGenerationConfig_; + } + } + + /** + * + * + *
+       * Optional. The configuration to be used to generate an Open API schema.
+       * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfigOrBuilder> + internalGetOpenApiToolsetGenerationConfigFieldBuilder() { + if (openApiToolsetGenerationConfigBuilder_ == null) { + openApiToolsetGenerationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .OpenApiToolsetGenerationConfigOrBuilder>( + getOpenApiToolsetGenerationConfig(), getParentForChildren(), isClean()); + openApiToolsetGenerationConfig_ = null; + } + return openApiToolsetGenerationConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolGenerationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AppGenerationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The context which describes the requirements of the agents &
+     * tools to be generated.
+     * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The context. + */ + java.lang.String getContext(); + + /** + * + * + *
+     * Optional. The context which describes the requirements of the agents &
+     * tools to be generated.
+     * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for context. + */ + com.google.protobuf.ByteString getContextBytes(); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getFileContextsList(); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.FileContext getFileContexts(int index); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFileContextsCount(); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getFileContextsOrBuilderList(); + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.FileContextOrBuilder getFileContextsOrBuilder(int index); + + /** + * + * + *
+     * Optional. The insights dataset to be used to fetch conversation data for
+     * generating the agents & tools.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + + /** + * + * + *
+     * Optional. The insights dataset to be used to fetch conversation data for
+     * generating the agents & tools.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
+     * Optional. Whether to generate the evaluations for the app. If true, the
+     * provided context will be used to generate the evaluations data.
+     * 
+ * + * bool generate_evaluations = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The generateEvaluations. + */ + boolean getGenerateEvaluations(); + + /** + * + * + *
+     * Optional. The Cloud Storage location to store the generated question
+     * answer data to be used by the Datastore tool. This data is generated only
+     * when using conversation data as an input source. The location must be
+     * in the same project as the app.
+     * Format: `gs://...`.
+     * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsLocation. + */ + java.lang.String getGcsLocation(); + + /** + * + * + *
+     * Optional. The Cloud Storage location to store the generated question
+     * answer data to be used by the Datastore tool. This data is generated only
+     * when using conversation data as an input source. The location must be
+     * in the same project as the app.
+     * Format: `gs://...`.
+     * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsLocation. + */ + com.google.protobuf.ByteString getGcsLocationBytes(); + } + + /** + * + * + *
+   * The configuration to be used to generate the app.
+   * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig} + */ + public static final class AppGenerationConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig) + AppGenerationConfigOrBuilder { + 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= */ "", + "AppGenerationConfig"); + } + + // Use AppGenerationConfig.newBuilder() to construct. + private AppGenerationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AppGenerationConfig() { + context_ = ""; + fileContexts_ = java.util.Collections.emptyList(); + datasetId_ = ""; + gcsLocation_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_AppGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_AppGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.Builder + .class); + } + + public static final int CONTEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object context_ = ""; + + /** + * + * + *
+     * Optional. The context which describes the requirements of the agents &
+     * tools to be generated.
+     * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The context. + */ + @java.lang.Override + public java.lang.String getContext() { + java.lang.Object ref = context_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + context_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The context which describes the requirements of the agents &
+     * tools to be generated.
+     * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for context. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContextBytes() { + java.lang.Object ref = context_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + context_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_CONTEXTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List fileContexts_; + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getFileContextsList() { + return fileContexts_; + } + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getFileContextsOrBuilderList() { + return fileContexts_; + } + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFileContextsCount() { + return fileContexts_.size(); + } + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContext getFileContexts(int index) { + return fileContexts_.get(index); + } + + /** + * + * + *
+     * Optional. The files to be used as context.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.FileContextOrBuilder getFileContextsOrBuilder(int index) { + return fileContexts_.get(index); + } + + public static final int DATASET_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object datasetId_ = ""; + + /** + * + * + *
+     * Optional. The insights dataset to be used to fetch conversation data for
+     * generating the agents & tools.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The insights dataset to be used to fetch conversation data for
+     * generating the agents & tools.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERATE_EVALUATIONS_FIELD_NUMBER = 4; + private boolean generateEvaluations_ = false; + + /** + * + * + *
+     * Optional. Whether to generate the evaluations for the app. If true, the
+     * provided context will be used to generate the evaluations data.
+     * 
+ * + * bool generate_evaluations = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The generateEvaluations. + */ + @java.lang.Override + public boolean getGenerateEvaluations() { + return generateEvaluations_; + } + + public static final int GCS_LOCATION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcsLocation_ = ""; + + /** + * + * + *
+     * Optional. The Cloud Storage location to store the generated question
+     * answer data to be used by the Datastore tool. This data is generated only
+     * when using conversation data as an input source. The location must be
+     * in the same project as the app.
+     * Format: `gs://...`.
+     * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsLocation. + */ + @java.lang.Override + public java.lang.String getGcsLocation() { + java.lang.Object ref = gcsLocation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsLocation_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The Cloud Storage location to store the generated question
+     * answer data to be used by the Datastore tool. This data is generated only
+     * when using conversation data as an input source. The location must be
+     * in the same project as the app.
+     * Format: `gs://...`.
+     * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsLocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsLocationBytes() { + java.lang.Object ref = gcsLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsLocation_ = 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(context_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, context_); + } + for (int i = 0; i < fileContexts_.size(); i++) { + output.writeMessage(2, fileContexts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, datasetId_); + } + if (generateEvaluations_ != false) { + output.writeBool(4, generateEvaluations_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcsLocation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, gcsLocation_); + } + 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(context_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, context_); + } + for (int i = 0; i < fileContexts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fileContexts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, datasetId_); + } + if (generateEvaluations_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, generateEvaluations_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcsLocation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, gcsLocation_); + } + 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.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig) obj; + + if (!getContext().equals(other.getContext())) return false; + if (!getFileContextsList().equals(other.getFileContextsList())) return false; + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (getGenerateEvaluations() != other.getGenerateEvaluations()) return false; + if (!getGcsLocation().equals(other.getGcsLocation())) 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) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + if (getFileContextsCount() > 0) { + hash = (37 * hash) + FILE_CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getFileContextsList().hashCode(); + } + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + GENERATE_EVALUATIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGenerateEvaluations()); + hash = (37 * hash) + GCS_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig 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 configuration to be used to generate the app.
+     * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_AppGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_AppGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + context_ = ""; + if (fileContextsBuilder_ == null) { + fileContexts_ = java.util.Collections.emptyList(); + } else { + fileContexts_ = null; + fileContextsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + datasetId_ = ""; + generateEvaluations_ = false; + gcsLocation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_AppGenerationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig result) { + if (fileContextsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + fileContexts_ = java.util.Collections.unmodifiableList(fileContexts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fileContexts_ = fileContexts_; + } else { + result.fileContexts_ = fileContextsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.context_ = context_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.datasetId_ = datasetId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.generateEvaluations_ = generateEvaluations_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.gcsLocation_ = gcsLocation_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + .getDefaultInstance()) return this; + if (!other.getContext().isEmpty()) { + context_ = other.context_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (fileContextsBuilder_ == null) { + if (!other.fileContexts_.isEmpty()) { + if (fileContexts_.isEmpty()) { + fileContexts_ = other.fileContexts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFileContextsIsMutable(); + fileContexts_.addAll(other.fileContexts_); + } + onChanged(); + } + } else { + if (!other.fileContexts_.isEmpty()) { + if (fileContextsBuilder_.isEmpty()) { + fileContextsBuilder_.dispose(); + fileContextsBuilder_ = null; + fileContexts_ = other.fileContexts_; + bitField0_ = (bitField0_ & ~0x00000002); + fileContextsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFileContextsFieldBuilder() + : null; + } else { + fileContextsBuilder_.addAllMessages(other.fileContexts_); + } + } + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getGenerateEvaluations() != false) { + setGenerateEvaluations(other.getGenerateEvaluations()); + } + if (!other.getGcsLocation().isEmpty()) { + gcsLocation_ = other.gcsLocation_; + 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: + { + context_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.ces.v1beta.FileContext m = + input.readMessage( + com.google.cloud.ces.v1beta.FileContext.parser(), extensionRegistry); + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.add(m); + } else { + fileContextsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + datasetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + generateEvaluations_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + gcsLocation_ = 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 context_ = ""; + + /** + * + * + *
+       * Optional. The context which describes the requirements of the agents &
+       * tools to be generated.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The context. + */ + public java.lang.String getContext() { + java.lang.Object ref = context_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + context_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The context which describes the requirements of the agents &
+       * tools to be generated.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for context. + */ + public com.google.protobuf.ByteString getContextBytes() { + java.lang.Object ref = context_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + context_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The context which describes the requirements of the agents &
+       * tools to be generated.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The context to set. + * @return This builder for chaining. + */ + public Builder setContext(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The context which describes the requirements of the agents &
+       * tools to be generated.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearContext() { + context_ = getDefaultInstance().getContext(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The context which describes the requirements of the agents &
+       * tools to be generated.
+       * 
+ * + * string context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for context to set. + * @return This builder for chaining. + */ + public Builder setContextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + context_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List fileContexts_ = + java.util.Collections.emptyList(); + + private void ensureFileContextsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fileContexts_ = + new java.util.ArrayList(fileContexts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.FileContext, + com.google.cloud.ces.v1beta.FileContext.Builder, + com.google.cloud.ces.v1beta.FileContextOrBuilder> + fileContextsBuilder_; + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getFileContextsList() { + if (fileContextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileContexts_); + } else { + return fileContextsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getFileContextsCount() { + if (fileContextsBuilder_ == null) { + return fileContexts_.size(); + } else { + return fileContextsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext getFileContexts(int index) { + if (fileContextsBuilder_ == null) { + return fileContexts_.get(index); + } else { + return fileContextsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFileContexts(int index, com.google.cloud.ces.v1beta.FileContext value) { + if (fileContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileContextsIsMutable(); + fileContexts_.set(index, value); + onChanged(); + } else { + fileContextsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFileContexts( + int index, com.google.cloud.ces.v1beta.FileContext.Builder builderForValue) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.set(index, builderForValue.build()); + onChanged(); + } else { + fileContextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFileContexts(com.google.cloud.ces.v1beta.FileContext value) { + if (fileContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileContextsIsMutable(); + fileContexts_.add(value); + onChanged(); + } else { + fileContextsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFileContexts(int index, com.google.cloud.ces.v1beta.FileContext value) { + if (fileContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileContextsIsMutable(); + fileContexts_.add(index, value); + onChanged(); + } else { + fileContextsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFileContexts( + com.google.cloud.ces.v1beta.FileContext.Builder builderForValue) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.add(builderForValue.build()); + onChanged(); + } else { + fileContextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addFileContexts( + int index, com.google.cloud.ces.v1beta.FileContext.Builder builderForValue) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.add(index, builderForValue.build()); + onChanged(); + } else { + fileContextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllFileContexts( + java.lang.Iterable values) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileContexts_); + onChanged(); + } else { + fileContextsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFileContexts() { + if (fileContextsBuilder_ == null) { + fileContexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + fileContextsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeFileContexts(int index) { + if (fileContextsBuilder_ == null) { + ensureFileContextsIsMutable(); + fileContexts_.remove(index); + onChanged(); + } else { + fileContextsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext.Builder getFileContextsBuilder(int index) { + return internalGetFileContextsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContextOrBuilder getFileContextsOrBuilder(int index) { + if (fileContextsBuilder_ == null) { + return fileContexts_.get(index); + } else { + return fileContextsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFileContextsOrBuilderList() { + if (fileContextsBuilder_ != null) { + return fileContextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileContexts_); + } + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext.Builder addFileContextsBuilder() { + return internalGetFileContextsFieldBuilder() + .addBuilder(com.google.cloud.ces.v1beta.FileContext.getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.FileContext.Builder addFileContextsBuilder(int index) { + return internalGetFileContextsFieldBuilder() + .addBuilder(index, com.google.cloud.ces.v1beta.FileContext.getDefaultInstance()); + } + + /** + * + * + *
+       * Optional. The files to be used as context.
+       * 
+ * + * + * repeated .google.cloud.ces.v1beta.FileContext file_contexts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getFileContextsBuilderList() { + return internalGetFileContextsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.FileContext, + com.google.cloud.ces.v1beta.FileContext.Builder, + com.google.cloud.ces.v1beta.FileContextOrBuilder> + internalGetFileContextsFieldBuilder() { + if (fileContextsBuilder_ == null) { + fileContextsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.FileContext, + com.google.cloud.ces.v1beta.FileContext.Builder, + com.google.cloud.ces.v1beta.FileContextOrBuilder>( + fileContexts_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + fileContexts_ = null; + } + return fileContextsBuilder_; + } + + private java.lang.Object datasetId_ = ""; + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the agents & tools.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the agents & tools.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the agents & tools.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + datasetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the agents & tools.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + datasetId_ = getDefaultInstance().getDatasetId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the agents & tools.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + datasetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean generateEvaluations_; + + /** + * + * + *
+       * Optional. Whether to generate the evaluations for the app. If true, the
+       * provided context will be used to generate the evaluations data.
+       * 
+ * + * bool generate_evaluations = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The generateEvaluations. + */ + @java.lang.Override + public boolean getGenerateEvaluations() { + return generateEvaluations_; + } + + /** + * + * + *
+       * Optional. Whether to generate the evaluations for the app. If true, the
+       * provided context will be used to generate the evaluations data.
+       * 
+ * + * bool generate_evaluations = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The generateEvaluations to set. + * @return This builder for chaining. + */ + public Builder setGenerateEvaluations(boolean value) { + + generateEvaluations_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Whether to generate the evaluations for the app. If true, the
+       * provided context will be used to generate the evaluations data.
+       * 
+ * + * bool generate_evaluations = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGenerateEvaluations() { + bitField0_ = (bitField0_ & ~0x00000008); + generateEvaluations_ = false; + onChanged(); + return this; + } + + private java.lang.Object gcsLocation_ = ""; + + /** + * + * + *
+       * Optional. The Cloud Storage location to store the generated question
+       * answer data to be used by the Datastore tool. This data is generated only
+       * when using conversation data as an input source. The location must be
+       * in the same project as the app.
+       * Format: `gs://...`.
+       * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsLocation. + */ + public java.lang.String getGcsLocation() { + java.lang.Object ref = gcsLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The Cloud Storage location to store the generated question
+       * answer data to be used by the Datastore tool. This data is generated only
+       * when using conversation data as an input source. The location must be
+       * in the same project as the app.
+       * Format: `gs://...`.
+       * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsLocation. + */ + public com.google.protobuf.ByteString getGcsLocationBytes() { + java.lang.Object ref = gcsLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The Cloud Storage location to store the generated question
+       * answer data to be used by the Datastore tool. This data is generated only
+       * when using conversation data as an input source. The location must be
+       * in the same project as the app.
+       * Format: `gs://...`.
+       * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The gcsLocation to set. + * @return This builder for chaining. + */ + public Builder setGcsLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcsLocation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The Cloud Storage location to store the generated question
+       * answer data to be used by the Datastore tool. This data is generated only
+       * when using conversation data as an input source. The location must be
+       * in the same project as the app.
+       * Format: `gs://...`.
+       * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGcsLocation() { + gcsLocation_ = getDefaultInstance().getGcsLocation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The Cloud Storage location to store the generated question
+       * answer data to be used by the Datastore tool. This data is generated only
+       * when using conversation data as an input source. The location must be
+       * in the same project as the app.
+       * Format: `gs://...`.
+       * 
+ * + * string gcs_location = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for gcsLocation to set. + * @return This builder for chaining. + */ + public Builder setGcsLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcsLocation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppGenerationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EvaluationGenerationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The insights dataset to be used to fetch conversation data for
+     * generating the evaluations.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + + /** + * + * + *
+     * Optional. The insights dataset to be used to fetch conversation data for
+     * generating the evaluations.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + } + + /** + * + * + *
+   * The configuration to be used to generate the evaluations.
+   * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig} + */ + public static final class EvaluationGenerationConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig) + EvaluationGenerationConfigOrBuilder { + 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= */ "", + "EvaluationGenerationConfig"); + } + + // Use EvaluationGenerationConfig.newBuilder() to construct. + private EvaluationGenerationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EvaluationGenerationConfig() { + datasetId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .Builder.class); + } + + public static final int DATASET_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object datasetId_ = ""; + + /** + * + * + *
+     * Optional. The insights dataset to be used to fetch conversation data for
+     * generating the evaluations.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The insights dataset to be used to fetch conversation data for
+     * generating the evaluations.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = 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(datasetId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, datasetId_); + } + 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(datasetId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, datasetId_); + } + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig) obj; + + if (!getDatasetId().equals(other.getDatasetId())) 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) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + 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 configuration to be used to generate the evaluations.
+     * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + datasetId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationGenerationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.datasetId_ = datasetId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .getDefaultInstance()) return this; + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + 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: + { + datasetId_ = 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 datasetId_ = ""; + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the evaluations.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the evaluations.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the evaluations.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + datasetId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the evaluations.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + datasetId_ = getDefaultInstance().getDatasetId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The insights dataset to be used to fetch conversation data for
+       * generating the evaluations.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + datasetId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationGenerationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluationGenerationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EvaluationPersonasGenerationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
+   * The configuration to be used to generate the evaluation personas.
+   * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig} + */ + public static final class EvaluationPersonasGenerationConfig + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig) + EvaluationPersonasGenerationConfigOrBuilder { + 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= */ "", + "EvaluationPersonasGenerationConfig"); + } + + // Use EvaluationPersonasGenerationConfig.newBuilder() to construct. + private EvaluationPersonasGenerationConfig( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EvaluationPersonasGenerationConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationPersonasGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationPersonasGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.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.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig) + 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.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + 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 configuration to be used to generate the evaluation personas.
+     * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationPersonasGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationPersonasGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.Builder.class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig.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.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_EvaluationPersonasGenerationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.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.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EvaluationPersonasGenerationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface QualityReportGenerationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The evaluation run used to inform quality report analysis.
+     * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The evaluationRun. + */ + java.lang.String getEvaluationRun(); + + /** + * + * + *
+     * Required. The evaluation run used to inform quality report analysis.
+     * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for evaluationRun. + */ + com.google.protobuf.ByteString getEvaluationRunBytes(); + } + + /** + * + * + *
+   * The configuration to be used for quality report generation.
+   * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig} + */ + public static final class QualityReportGenerationConfig + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig) + QualityReportGenerationConfigOrBuilder { + 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= */ "", + "QualityReportGenerationConfig"); + } + + // Use QualityReportGenerationConfig.newBuilder() to construct. + private QualityReportGenerationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private QualityReportGenerationConfig() { + evaluationRun_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_QualityReportGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_QualityReportGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .Builder.class); + } + + public static final int EVALUATION_RUN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object evaluationRun_ = ""; + + /** + * + * + *
+     * Required. The evaluation run used to inform quality report analysis.
+     * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The evaluationRun. + */ + @java.lang.Override + public java.lang.String getEvaluationRun() { + java.lang.Object ref = evaluationRun_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + evaluationRun_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The evaluation run used to inform quality report analysis.
+     * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for evaluationRun. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEvaluationRunBytes() { + java.lang.Object ref = evaluationRun_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + evaluationRun_ = 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(evaluationRun_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, evaluationRun_); + } + 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(evaluationRun_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, evaluationRun_); + } + 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.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig) + obj; + + if (!getEvaluationRun().equals(other.getEvaluationRun())) 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) + EVALUATION_RUN_FIELD_NUMBER; + hash = (53 * hash) + getEvaluationRun().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + 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.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + 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 configuration to be used for quality report generation.
+     * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_QualityReportGenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_QualityReportGenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + evaluationRun_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_QualityReportGenerationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.evaluationRun_ = evaluationRun_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .getDefaultInstance()) return this; + if (!other.getEvaluationRun().isEmpty()) { + evaluationRun_ = other.evaluationRun_; + 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: + { + evaluationRun_ = 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 evaluationRun_ = ""; + + /** + * + * + *
+       * Required. The evaluation run used to inform quality report analysis.
+       * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The evaluationRun. + */ + public java.lang.String getEvaluationRun() { + java.lang.Object ref = evaluationRun_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + evaluationRun_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The evaluation run used to inform quality report analysis.
+       * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for evaluationRun. + */ + public com.google.protobuf.ByteString getEvaluationRunBytes() { + java.lang.Object ref = evaluationRun_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + evaluationRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The evaluation run used to inform quality report analysis.
+       * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The evaluationRun to set. + * @return This builder for chaining. + */ + public Builder setEvaluationRun(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + evaluationRun_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The evaluation run used to inform quality report analysis.
+       * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEvaluationRun() { + evaluationRun_ = getDefaultInstance().getEvaluationRun(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The evaluation run used to inform quality report analysis.
+       * 
+ * + * + * string evaluation_run = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for evaluationRun to set. + * @return This builder for chaining. + */ + public Builder setEvaluationRunBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + evaluationRun_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QualityReportGenerationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HillClimbingFixConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The quality report used to inform the instruction following
+     * fix.
+     * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the qualityReport field is set. + */ + boolean hasQualityReport(); + + /** + * + * + *
+     * Required. The quality report used to inform the instruction following
+     * fix.
+     * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The qualityReport. + */ + com.google.cloud.ces.v1beta.QualityReport getQualityReport(); + + /** + * + * + *
+     * Required. The quality report used to inform the instruction following
+     * fix.
+     * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ces.v1beta.QualityReportOrBuilder getQualityReportOrBuilder(); + } + + /** + * + * + *
+   * The configuration to be used for hill climbing fixes.
+   * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig} + */ + public static final class HillClimbingFixConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig) + HillClimbingFixConfigOrBuilder { + 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= */ "", + "HillClimbingFixConfig"); + } + + // Use HillClimbingFixConfig.newBuilder() to construct. + private HillClimbingFixConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HillClimbingFixConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_HillClimbingFixConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_HillClimbingFixConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.Builder + .class); + } + + private int bitField0_; + public static final int QUALITY_REPORT_FIELD_NUMBER = 1; + private com.google.cloud.ces.v1beta.QualityReport qualityReport_; + + /** + * + * + *
+     * Required. The quality report used to inform the instruction following
+     * fix.
+     * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the qualityReport field is set. + */ + @java.lang.Override + public boolean hasQualityReport() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The quality report used to inform the instruction following
+     * fix.
+     * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The qualityReport. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.QualityReport getQualityReport() { + return qualityReport_ == null + ? com.google.cloud.ces.v1beta.QualityReport.getDefaultInstance() + : qualityReport_; + } + + /** + * + * + *
+     * Required. The quality report used to inform the instruction following
+     * fix.
+     * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.QualityReportOrBuilder getQualityReportOrBuilder() { + return qualityReport_ == null + ? com.google.cloud.ces.v1beta.QualityReport.getDefaultInstance() + : qualityReport_; + } + + 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, getQualityReport()); + } + 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, getQualityReport()); + } + 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.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig) obj; + + if (hasQualityReport() != other.hasQualityReport()) return false; + if (hasQualityReport()) { + if (!getQualityReport().equals(other.getQualityReport())) 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 (hasQualityReport()) { + hash = (37 * hash) + QUALITY_REPORT_FIELD_NUMBER; + hash = (53 * hash) + getQualityReport().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + 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.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + 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.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + 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.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + 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.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + 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.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig 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 configuration to be used for hill climbing fixes.
+     * 
+ * + * Protobuf type {@code + * google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig) + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_HillClimbingFixConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_HillClimbingFixConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetQualityReportFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + qualityReport_ = null; + if (qualityReportBuilder_ != null) { + qualityReportBuilder_.dispose(); + qualityReportBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_HillClimbingFixConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.qualityReport_ = + qualityReportBuilder_ == null ? qualityReport_ : qualityReportBuilder_.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.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig) { + return mergeFrom( + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig other) { + if (other + == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + .getDefaultInstance()) return this; + if (other.hasQualityReport()) { + mergeQualityReport(other.getQualityReport()); + } + 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( + internalGetQualityReportFieldBuilder().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.ces.v1beta.QualityReport qualityReport_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.QualityReport, + com.google.cloud.ces.v1beta.QualityReport.Builder, + com.google.cloud.ces.v1beta.QualityReportOrBuilder> + qualityReportBuilder_; + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the qualityReport field is set. + */ + public boolean hasQualityReport() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The qualityReport. + */ + public com.google.cloud.ces.v1beta.QualityReport getQualityReport() { + if (qualityReportBuilder_ == null) { + return qualityReport_ == null + ? com.google.cloud.ces.v1beta.QualityReport.getDefaultInstance() + : qualityReport_; + } else { + return qualityReportBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQualityReport(com.google.cloud.ces.v1beta.QualityReport value) { + if (qualityReportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + qualityReport_ = value; + } else { + qualityReportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQualityReport( + com.google.cloud.ces.v1beta.QualityReport.Builder builderForValue) { + if (qualityReportBuilder_ == null) { + qualityReport_ = builderForValue.build(); + } else { + qualityReportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeQualityReport(com.google.cloud.ces.v1beta.QualityReport value) { + if (qualityReportBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && qualityReport_ != null + && qualityReport_ != com.google.cloud.ces.v1beta.QualityReport.getDefaultInstance()) { + getQualityReportBuilder().mergeFrom(value); + } else { + qualityReport_ = value; + } + } else { + qualityReportBuilder_.mergeFrom(value); + } + if (qualityReport_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearQualityReport() { + bitField0_ = (bitField0_ & ~0x00000001); + qualityReport_ = null; + if (qualityReportBuilder_ != null) { + qualityReportBuilder_.dispose(); + qualityReportBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ces.v1beta.QualityReport.Builder getQualityReportBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetQualityReportFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ces.v1beta.QualityReportOrBuilder getQualityReportOrBuilder() { + if (qualityReportBuilder_ != null) { + return qualityReportBuilder_.getMessageOrBuilder(); + } else { + return qualityReport_ == null + ? com.google.cloud.ces.v1beta.QualityReport.getDefaultInstance() + : qualityReport_; + } + } + + /** + * + * + *
+       * Required. The quality report used to inform the instruction following
+       * fix.
+       * 
+ * + * + * .google.cloud.ces.v1beta.QualityReport quality_report = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.QualityReport, + com.google.cloud.ces.v1beta.QualityReport.Builder, + com.google.cloud.ces.v1beta.QualityReportOrBuilder> + internalGetQualityReportFieldBuilder() { + if (qualityReportBuilder_ == null) { + qualityReportBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.QualityReport, + com.google.cloud.ces.v1beta.QualityReport.Builder, + com.google.cloud.ces.v1beta.QualityReportOrBuilder>( + getQualityReport(), getParentForChildren(), isClean()); + qualityReport_ = null; + } + return qualityReportBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .HillClimbingFixConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HillClimbingFixConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int resourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object resource_; + + public enum ResourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AGENT(2), + TOOL(4), + TOOLSET(6), + RESOURCE_NOT_SET(0); + private final int value; + + private ResourceCase(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 ResourceCase valueOf(int value) { + return forNumber(value); + } + + public static ResourceCase forNumber(int value) { + switch (value) { + case 2: + return AGENT; + case 4: + return TOOL; + case 6: + return TOOLSET; + case 0: + return RESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourceCase getResourceCase() { + return ResourceCase.forNumber(resourceCase_); + } + + public static final int AGENT_FIELD_NUMBER = 2; + + /** + * + * + *
+   * The agent resource to be used by the LLM assistant, can be empty for
+   * generating a new agent.
+   * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + * + * @return Whether the agent field is set. + */ + @java.lang.Override + public boolean hasAgent() { + return resourceCase_ == 2; + } + + /** + * + * + *
+   * The agent resource to be used by the LLM assistant, can be empty for
+   * generating a new agent.
+   * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + * + * @return The agent. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.Agent getAgent() { + if (resourceCase_ == 2) { + return (com.google.cloud.ces.v1beta.Agent) resource_; + } + return com.google.cloud.ces.v1beta.Agent.getDefaultInstance(); + } + + /** + * + * + *
+   * The agent resource to be used by the LLM assistant, can be empty for
+   * generating a new agent.
+   * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.AgentOrBuilder getAgentOrBuilder() { + if (resourceCase_ == 2) { + return (com.google.cloud.ces.v1beta.Agent) resource_; + } + return com.google.cloud.ces.v1beta.Agent.getDefaultInstance(); + } + + public static final int TOOL_FIELD_NUMBER = 4; + + /** + * + * + *
+   * The tool resource to be used by the LLM assistant, can be empty for
+   * generating a new tool.
+   * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + * + * @return Whether the tool field is set. + */ + @java.lang.Override + public boolean hasTool() { + return resourceCase_ == 4; + } + + /** + * + * + *
+   * The tool resource to be used by the LLM assistant, can be empty for
+   * generating a new tool.
+   * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + * + * @return The tool. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.Tool getTool() { + if (resourceCase_ == 4) { + return (com.google.cloud.ces.v1beta.Tool) resource_; + } + return com.google.cloud.ces.v1beta.Tool.getDefaultInstance(); + } + + /** + * + * + *
+   * The tool resource to be used by the LLM assistant, can be empty for
+   * generating a new tool.
+   * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.ToolOrBuilder getToolOrBuilder() { + if (resourceCase_ == 4) { + return (com.google.cloud.ces.v1beta.Tool) resource_; + } + return com.google.cloud.ces.v1beta.Tool.getDefaultInstance(); + } + + public static final int TOOLSET_FIELD_NUMBER = 6; + + /** + * + * + *
+   * The toolset resource to be used by the LLM assistant, can be empty for
+   * generating a new toolset.
+   * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + * + * @return Whether the toolset field is set. + */ + @java.lang.Override + public boolean hasToolset() { + return resourceCase_ == 6; + } + + /** + * + * + *
+   * The toolset resource to be used by the LLM assistant, can be empty for
+   * generating a new toolset.
+   * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + * + * @return The toolset. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.Toolset getToolset() { + if (resourceCase_ == 6) { + return (com.google.cloud.ces.v1beta.Toolset) resource_; + } + return com.google.cloud.ces.v1beta.Toolset.getDefaultInstance(); + } + + /** + * + * + *
+   * The toolset resource to be used by the LLM assistant, can be empty for
+   * generating a new toolset.
+   * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.ToolsetOrBuilder getToolsetOrBuilder() { + if (resourceCase_ == 6) { + return (com.google.cloud.ces.v1beta.Toolset) resource_; + } + return com.google.cloud.ces.v1beta.Toolset.getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The resource name of the app to generate the resource for.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the app to generate the resource for.
+   * 
+ * + * + * 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 REFINE_INSTRUCTIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + refineInstructions_; + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getRefineInstructionsList() { + return refineInstructions_; + } + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder> + getRefineInstructionsOrBuilderList() { + return refineInstructions_; + } + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getRefineInstructionsCount() { + return refineInstructions_.size(); + } + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + getRefineInstructions(int index) { + return refineInstructions_.get(index); + } + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder + getRefineInstructionsOrBuilder(int index) { + return refineInstructions_.get(index); + } + + public static final int TOOL_GENERATION_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + toolGenerationConfig_; + + /** + * + * + *
+   * Optional. The configuration to be used to generate the tool.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolGenerationConfig field is set. + */ + @java.lang.Override + public boolean hasToolGenerationConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The configuration to be used to generate the tool.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolGenerationConfig. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + getToolGenerationConfig() { + return toolGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .getDefaultInstance() + : toolGenerationConfig_; + } + + /** + * + * + *
+   * Optional. The configuration to be used to generate the tool.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigOrBuilder + getToolGenerationConfigOrBuilder() { + return toolGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .getDefaultInstance() + : toolGenerationConfig_; + } + + public static final int APP_GENERATION_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + appGenerationConfig_; + + /** + * + * + *
+   * Optional. The configuration to be used to generate the agents and tools.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the appGenerationConfig field is set. + */ + @java.lang.Override + public boolean hasAppGenerationConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The configuration to be used to generate the agents and tools.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appGenerationConfig. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + getAppGenerationConfig() { + return appGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + .getDefaultInstance() + : appGenerationConfig_; + } + + /** + * + * + *
+   * Optional. The configuration to be used to generate the agents and tools.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigOrBuilder + getAppGenerationConfigOrBuilder() { + return appGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + .getDefaultInstance() + : appGenerationConfig_; + } + + public static final int EVALUATION_GENERATION_CONFIG_FIELD_NUMBER = 8; + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + evaluationGenerationConfig_; + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluations.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationGenerationConfig field is set. + */ + @java.lang.Override + public boolean hasEvaluationGenerationConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluations.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationGenerationConfig. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + getEvaluationGenerationConfig() { + return evaluationGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .getDefaultInstance() + : evaluationGenerationConfig_; + } + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluations.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfigOrBuilder + getEvaluationGenerationConfigOrBuilder() { + return evaluationGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .getDefaultInstance() + : evaluationGenerationConfig_; + } + + public static final int EVALUATION_PERSONAS_GENERATION_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + evaluationPersonasGenerationConfig_; + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluation personas.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationPersonasGenerationConfig field is set. + */ + @java.lang.Override + public boolean hasEvaluationPersonasGenerationConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluation personas.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationPersonasGenerationConfig. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + getEvaluationPersonasGenerationConfig() { + return evaluationPersonasGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + .getDefaultInstance() + : evaluationPersonasGenerationConfig_; + } + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluation personas.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfigOrBuilder + getEvaluationPersonasGenerationConfigOrBuilder() { + return evaluationPersonasGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + .getDefaultInstance() + : evaluationPersonasGenerationConfig_; + } + + public static final int QUALITY_REPORT_GENERATION_CONFIG_FIELD_NUMBER = 10; + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + qualityReportGenerationConfig_; + + /** + * + * + *
+   * Optional. The configuration to be used for quality report generation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the qualityReportGenerationConfig field is set. + */ + @java.lang.Override + public boolean hasQualityReportGenerationConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. The configuration to be used for quality report generation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The qualityReportGenerationConfig. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + getQualityReportGenerationConfig() { + return qualityReportGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .getDefaultInstance() + : qualityReportGenerationConfig_; + } + + /** + * + * + *
+   * Optional. The configuration to be used for quality report generation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfigOrBuilder + getQualityReportGenerationConfigOrBuilder() { + return qualityReportGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .getDefaultInstance() + : qualityReportGenerationConfig_; + } + + public static final int HILL_CLIMBING_FIX_CONFIG_FIELD_NUMBER = 11; + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + hillClimbingFixConfig_; + + /** + * + * + *
+   * Optional. The configuration to be used for hill climbing fixes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hillClimbingFixConfig field is set. + */ + @java.lang.Override + public boolean hasHillClimbingFixConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. The configuration to be used for hill climbing fixes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hillClimbingFixConfig. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + getHillClimbingFixConfig() { + return hillClimbingFixConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + .getDefaultInstance() + : hillClimbingFixConfig_; + } + + /** + * + * + *
+   * Optional. The configuration to be used for hill climbing fixes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigOrBuilder + getHillClimbingFixConfigOrBuilder() { + return hillClimbingFixConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + .getDefaultInstance() + : hillClimbingFixConfig_; + } + + 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 (resourceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.ces.v1beta.Agent) resource_); + } + for (int i = 0; i < refineInstructions_.size(); i++) { + output.writeMessage(3, refineInstructions_.get(i)); + } + if (resourceCase_ == 4) { + output.writeMessage(4, (com.google.cloud.ces.v1beta.Tool) resource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getToolGenerationConfig()); + } + if (resourceCase_ == 6) { + output.writeMessage(6, (com.google.cloud.ces.v1beta.Toolset) resource_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getAppGenerationConfig()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getEvaluationGenerationConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getEvaluationPersonasGenerationConfig()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(10, getQualityReportGenerationConfig()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(11, getHillClimbingFixConfig()); + } + 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 (resourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.ces.v1beta.Agent) resource_); + } + for (int i = 0; i < refineInstructions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, refineInstructions_.get(i)); + } + if (resourceCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.ces.v1beta.Tool) resource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getToolGenerationConfig()); + } + if (resourceCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.ces.v1beta.Toolset) resource_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAppGenerationConfig()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, getEvaluationGenerationConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, getEvaluationPersonasGenerationConfig()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getQualityReportGenerationConfig()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, getHillClimbingFixConfig()); + } + 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.ces.v1beta.GenerateAppResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.ces.v1beta.GenerateAppResourceRequest other = + (com.google.cloud.ces.v1beta.GenerateAppResourceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRefineInstructionsList().equals(other.getRefineInstructionsList())) return false; + if (hasToolGenerationConfig() != other.hasToolGenerationConfig()) return false; + if (hasToolGenerationConfig()) { + if (!getToolGenerationConfig().equals(other.getToolGenerationConfig())) return false; + } + if (hasAppGenerationConfig() != other.hasAppGenerationConfig()) return false; + if (hasAppGenerationConfig()) { + if (!getAppGenerationConfig().equals(other.getAppGenerationConfig())) return false; + } + if (hasEvaluationGenerationConfig() != other.hasEvaluationGenerationConfig()) return false; + if (hasEvaluationGenerationConfig()) { + if (!getEvaluationGenerationConfig().equals(other.getEvaluationGenerationConfig())) + return false; + } + if (hasEvaluationPersonasGenerationConfig() != other.hasEvaluationPersonasGenerationConfig()) + return false; + if (hasEvaluationPersonasGenerationConfig()) { + if (!getEvaluationPersonasGenerationConfig() + .equals(other.getEvaluationPersonasGenerationConfig())) return false; + } + if (hasQualityReportGenerationConfig() != other.hasQualityReportGenerationConfig()) + return false; + if (hasQualityReportGenerationConfig()) { + if (!getQualityReportGenerationConfig().equals(other.getQualityReportGenerationConfig())) + return false; + } + if (hasHillClimbingFixConfig() != other.hasHillClimbingFixConfig()) return false; + if (hasHillClimbingFixConfig()) { + if (!getHillClimbingFixConfig().equals(other.getHillClimbingFixConfig())) return false; + } + if (!getResourceCase().equals(other.getResourceCase())) return false; + switch (resourceCase_) { + case 2: + if (!getAgent().equals(other.getAgent())) return false; + break; + case 4: + if (!getTool().equals(other.getTool())) return false; + break; + case 6: + if (!getToolset().equals(other.getToolset())) 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(); + if (getRefineInstructionsCount() > 0) { + hash = (37 * hash) + REFINE_INSTRUCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRefineInstructionsList().hashCode(); + } + if (hasToolGenerationConfig()) { + hash = (37 * hash) + TOOL_GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getToolGenerationConfig().hashCode(); + } + if (hasAppGenerationConfig()) { + hash = (37 * hash) + APP_GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAppGenerationConfig().hashCode(); + } + if (hasEvaluationGenerationConfig()) { + hash = (37 * hash) + EVALUATION_GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEvaluationGenerationConfig().hashCode(); + } + if (hasEvaluationPersonasGenerationConfig()) { + hash = (37 * hash) + EVALUATION_PERSONAS_GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEvaluationPersonasGenerationConfig().hashCode(); + } + if (hasQualityReportGenerationConfig()) { + hash = (37 * hash) + QUALITY_REPORT_GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getQualityReportGenerationConfig().hashCode(); + } + if (hasHillClimbingFixConfig()) { + hash = (37 * hash) + HILL_CLIMBING_FIX_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getHillClimbingFixConfig().hashCode(); + } + switch (resourceCase_) { + case 2: + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + break; + case 4: + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + break; + case 6: + hash = (37 * hash) + TOOLSET_FIELD_NUMBER; + hash = (53 * hash) + getToolset().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest 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.ces.v1beta.GenerateAppResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest 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.ces.v1beta.GenerateAppResourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest 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.ces.v1beta.GenerateAppResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest 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.ces.v1beta.GenerateAppResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest 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.ces.v1beta.GenerateAppResourceRequest 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
+   * [AgentService.GenerateAppResource][google.cloud.ces.v1beta.AgentService.GenerateAppResource].
+   * 
+ * + * Protobuf type {@code google.cloud.ces.v1beta.GenerateAppResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ces.v1beta.GenerateAppResourceRequest) + com.google.cloud.ces.v1beta.GenerateAppResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.class, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.ces.v1beta.GenerateAppResourceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRefineInstructionsFieldBuilder(); + internalGetToolGenerationConfigFieldBuilder(); + internalGetAppGenerationConfigFieldBuilder(); + internalGetEvaluationGenerationConfigFieldBuilder(); + internalGetEvaluationPersonasGenerationConfigFieldBuilder(); + internalGetQualityReportGenerationConfigFieldBuilder(); + internalGetHillClimbingFixConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (agentBuilder_ != null) { + agentBuilder_.clear(); + } + if (toolBuilder_ != null) { + toolBuilder_.clear(); + } + if (toolsetBuilder_ != null) { + toolsetBuilder_.clear(); + } + parent_ = ""; + if (refineInstructionsBuilder_ == null) { + refineInstructions_ = java.util.Collections.emptyList(); + } else { + refineInstructions_ = null; + refineInstructionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + toolGenerationConfig_ = null; + if (toolGenerationConfigBuilder_ != null) { + toolGenerationConfigBuilder_.dispose(); + toolGenerationConfigBuilder_ = null; + } + appGenerationConfig_ = null; + if (appGenerationConfigBuilder_ != null) { + appGenerationConfigBuilder_.dispose(); + appGenerationConfigBuilder_ = null; + } + evaluationGenerationConfig_ = null; + if (evaluationGenerationConfigBuilder_ != null) { + evaluationGenerationConfigBuilder_.dispose(); + evaluationGenerationConfigBuilder_ = null; + } + evaluationPersonasGenerationConfig_ = null; + if (evaluationPersonasGenerationConfigBuilder_ != null) { + evaluationPersonasGenerationConfigBuilder_.dispose(); + evaluationPersonasGenerationConfigBuilder_ = null; + } + qualityReportGenerationConfig_ = null; + if (qualityReportGenerationConfigBuilder_ != null) { + qualityReportGenerationConfigBuilder_.dispose(); + qualityReportGenerationConfigBuilder_ = null; + } + hillClimbingFixConfig_ = null; + if (hillClimbingFixConfigBuilder_ != null) { + hillClimbingFixConfigBuilder_.dispose(); + hillClimbingFixConfigBuilder_ = null; + } + resourceCase_ = 0; + resource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ces.v1beta.AgentServiceProto + .internal_static_google_cloud_ces_v1beta_GenerateAppResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest getDefaultInstanceForType() { + return com.google.cloud.ces.v1beta.GenerateAppResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest build() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest buildPartial() { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest result = + new com.google.cloud.ces.v1beta.GenerateAppResourceRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest result) { + if (refineInstructionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + refineInstructions_ = java.util.Collections.unmodifiableList(refineInstructions_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.refineInstructions_ = refineInstructions_; + } else { + result.refineInstructions_ = refineInstructionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.ces.v1beta.GenerateAppResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.toolGenerationConfig_ = + toolGenerationConfigBuilder_ == null + ? toolGenerationConfig_ + : toolGenerationConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.appGenerationConfig_ = + appGenerationConfigBuilder_ == null + ? appGenerationConfig_ + : appGenerationConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.evaluationGenerationConfig_ = + evaluationGenerationConfigBuilder_ == null + ? evaluationGenerationConfig_ + : evaluationGenerationConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.evaluationPersonasGenerationConfig_ = + evaluationPersonasGenerationConfigBuilder_ == null + ? evaluationPersonasGenerationConfig_ + : evaluationPersonasGenerationConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.qualityReportGenerationConfig_ = + qualityReportGenerationConfigBuilder_ == null + ? qualityReportGenerationConfig_ + : qualityReportGenerationConfigBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.hillClimbingFixConfig_ = + hillClimbingFixConfigBuilder_ == null + ? hillClimbingFixConfig_ + : hillClimbingFixConfigBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.ces.v1beta.GenerateAppResourceRequest result) { + result.resourceCase_ = resourceCase_; + result.resource_ = this.resource_; + if (resourceCase_ == 2 && agentBuilder_ != null) { + result.resource_ = agentBuilder_.build(); + } + if (resourceCase_ == 4 && toolBuilder_ != null) { + result.resource_ = toolBuilder_.build(); + } + if (resourceCase_ == 6 && toolsetBuilder_ != null) { + result.resource_ = toolsetBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ces.v1beta.GenerateAppResourceRequest) { + return mergeFrom((com.google.cloud.ces.v1beta.GenerateAppResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ces.v1beta.GenerateAppResourceRequest other) { + if (other == com.google.cloud.ces.v1beta.GenerateAppResourceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (refineInstructionsBuilder_ == null) { + if (!other.refineInstructions_.isEmpty()) { + if (refineInstructions_.isEmpty()) { + refineInstructions_ = other.refineInstructions_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureRefineInstructionsIsMutable(); + refineInstructions_.addAll(other.refineInstructions_); + } + onChanged(); + } + } else { + if (!other.refineInstructions_.isEmpty()) { + if (refineInstructionsBuilder_.isEmpty()) { + refineInstructionsBuilder_.dispose(); + refineInstructionsBuilder_ = null; + refineInstructions_ = other.refineInstructions_; + bitField0_ = (bitField0_ & ~0x00000010); + refineInstructionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRefineInstructionsFieldBuilder() + : null; + } else { + refineInstructionsBuilder_.addAllMessages(other.refineInstructions_); + } + } + } + if (other.hasToolGenerationConfig()) { + mergeToolGenerationConfig(other.getToolGenerationConfig()); + } + if (other.hasAppGenerationConfig()) { + mergeAppGenerationConfig(other.getAppGenerationConfig()); + } + if (other.hasEvaluationGenerationConfig()) { + mergeEvaluationGenerationConfig(other.getEvaluationGenerationConfig()); + } + if (other.hasEvaluationPersonasGenerationConfig()) { + mergeEvaluationPersonasGenerationConfig(other.getEvaluationPersonasGenerationConfig()); + } + if (other.hasQualityReportGenerationConfig()) { + mergeQualityReportGenerationConfig(other.getQualityReportGenerationConfig()); + } + if (other.hasHillClimbingFixConfig()) { + mergeHillClimbingFixConfig(other.getHillClimbingFixConfig()); + } + switch (other.getResourceCase()) { + case AGENT: + { + mergeAgent(other.getAgent()); + break; + } + case TOOL: + { + mergeTool(other.getTool()); + break; + } + case TOOLSET: + { + mergeToolset(other.getToolset()); + break; + } + case RESOURCE_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_ |= 0x00000008; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetAgentFieldBuilder().getBuilder(), extensionRegistry); + resourceCase_ = 2; + break; + } // case 18 + case 26: + { + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions m = + input.readMessage( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + .parser(), + extensionRegistry); + if (refineInstructionsBuilder_ == null) { + ensureRefineInstructionsIsMutable(); + refineInstructions_.add(m); + } else { + refineInstructionsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(internalGetToolFieldBuilder().getBuilder(), extensionRegistry); + resourceCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetToolGenerationConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetToolsetFieldBuilder().getBuilder(), extensionRegistry); + resourceCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetAppGenerationConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetEvaluationGenerationConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetEvaluationPersonasGenerationConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetQualityReportGenerationConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetHillClimbingFixConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + 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 resourceCase_ = 0; + private java.lang.Object resource_; + + public ResourceCase getResourceCase() { + return ResourceCase.forNumber(resourceCase_); + } + + public Builder clearResource() { + resourceCase_ = 0; + resource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Agent, + com.google.cloud.ces.v1beta.Agent.Builder, + com.google.cloud.ces.v1beta.AgentOrBuilder> + agentBuilder_; + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + * + * @return Whether the agent field is set. + */ + @java.lang.Override + public boolean hasAgent() { + return resourceCase_ == 2; + } + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + * + * @return The agent. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.Agent getAgent() { + if (agentBuilder_ == null) { + if (resourceCase_ == 2) { + return (com.google.cloud.ces.v1beta.Agent) resource_; + } + return com.google.cloud.ces.v1beta.Agent.getDefaultInstance(); + } else { + if (resourceCase_ == 2) { + return agentBuilder_.getMessage(); + } + return com.google.cloud.ces.v1beta.Agent.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + public Builder setAgent(com.google.cloud.ces.v1beta.Agent value) { + if (agentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + agentBuilder_.setMessage(value); + } + resourceCase_ = 2; + return this; + } + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + public Builder setAgent(com.google.cloud.ces.v1beta.Agent.Builder builderForValue) { + if (agentBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + agentBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 2; + return this; + } + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + public Builder mergeAgent(com.google.cloud.ces.v1beta.Agent value) { + if (agentBuilder_ == null) { + if (resourceCase_ == 2 + && resource_ != com.google.cloud.ces.v1beta.Agent.getDefaultInstance()) { + resource_ = + com.google.cloud.ces.v1beta.Agent.newBuilder( + (com.google.cloud.ces.v1beta.Agent) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 2) { + agentBuilder_.mergeFrom(value); + } else { + agentBuilder_.setMessage(value); + } + } + resourceCase_ = 2; + return this; + } + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + public Builder clearAgent() { + if (agentBuilder_ == null) { + if (resourceCase_ == 2) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 2) { + resourceCase_ = 0; + resource_ = null; + } + agentBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + public com.google.cloud.ces.v1beta.Agent.Builder getAgentBuilder() { + return internalGetAgentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.AgentOrBuilder getAgentOrBuilder() { + if ((resourceCase_ == 2) && (agentBuilder_ != null)) { + return agentBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 2) { + return (com.google.cloud.ces.v1beta.Agent) resource_; + } + return com.google.cloud.ces.v1beta.Agent.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The agent resource to be used by the LLM assistant, can be empty for
+     * generating a new agent.
+     * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Agent, + com.google.cloud.ces.v1beta.Agent.Builder, + com.google.cloud.ces.v1beta.AgentOrBuilder> + internalGetAgentFieldBuilder() { + if (agentBuilder_ == null) { + if (!(resourceCase_ == 2)) { + resource_ = com.google.cloud.ces.v1beta.Agent.getDefaultInstance(); + } + agentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Agent, + com.google.cloud.ces.v1beta.Agent.Builder, + com.google.cloud.ces.v1beta.AgentOrBuilder>( + (com.google.cloud.ces.v1beta.Agent) resource_, getParentForChildren(), isClean()); + resource_ = null; + } + resourceCase_ = 2; + onChanged(); + return agentBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Tool, + com.google.cloud.ces.v1beta.Tool.Builder, + com.google.cloud.ces.v1beta.ToolOrBuilder> + toolBuilder_; + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + * + * @return Whether the tool field is set. + */ + @java.lang.Override + public boolean hasTool() { + return resourceCase_ == 4; + } + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + * + * @return The tool. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.Tool getTool() { + if (toolBuilder_ == null) { + if (resourceCase_ == 4) { + return (com.google.cloud.ces.v1beta.Tool) resource_; + } + return com.google.cloud.ces.v1beta.Tool.getDefaultInstance(); + } else { + if (resourceCase_ == 4) { + return toolBuilder_.getMessage(); + } + return com.google.cloud.ces.v1beta.Tool.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + public Builder setTool(com.google.cloud.ces.v1beta.Tool value) { + if (toolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + toolBuilder_.setMessage(value); + } + resourceCase_ = 4; + return this; + } + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + public Builder setTool(com.google.cloud.ces.v1beta.Tool.Builder builderForValue) { + if (toolBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + toolBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 4; + return this; + } + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + public Builder mergeTool(com.google.cloud.ces.v1beta.Tool value) { + if (toolBuilder_ == null) { + if (resourceCase_ == 4 + && resource_ != com.google.cloud.ces.v1beta.Tool.getDefaultInstance()) { + resource_ = + com.google.cloud.ces.v1beta.Tool.newBuilder( + (com.google.cloud.ces.v1beta.Tool) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 4) { + toolBuilder_.mergeFrom(value); + } else { + toolBuilder_.setMessage(value); + } + } + resourceCase_ = 4; + return this; + } + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + public Builder clearTool() { + if (toolBuilder_ == null) { + if (resourceCase_ == 4) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 4) { + resourceCase_ = 0; + resource_ = null; + } + toolBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + public com.google.cloud.ces.v1beta.Tool.Builder getToolBuilder() { + return internalGetToolFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.ToolOrBuilder getToolOrBuilder() { + if ((resourceCase_ == 4) && (toolBuilder_ != null)) { + return toolBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 4) { + return (com.google.cloud.ces.v1beta.Tool) resource_; + } + return com.google.cloud.ces.v1beta.Tool.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The tool resource to be used by the LLM assistant, can be empty for
+     * generating a new tool.
+     * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Tool, + com.google.cloud.ces.v1beta.Tool.Builder, + com.google.cloud.ces.v1beta.ToolOrBuilder> + internalGetToolFieldBuilder() { + if (toolBuilder_ == null) { + if (!(resourceCase_ == 4)) { + resource_ = com.google.cloud.ces.v1beta.Tool.getDefaultInstance(); + } + toolBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Tool, + com.google.cloud.ces.v1beta.Tool.Builder, + com.google.cloud.ces.v1beta.ToolOrBuilder>( + (com.google.cloud.ces.v1beta.Tool) resource_, getParentForChildren(), isClean()); + resource_ = null; + } + resourceCase_ = 4; + onChanged(); + return toolBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Toolset, + com.google.cloud.ces.v1beta.Toolset.Builder, + com.google.cloud.ces.v1beta.ToolsetOrBuilder> + toolsetBuilder_; + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + * + * @return Whether the toolset field is set. + */ + @java.lang.Override + public boolean hasToolset() { + return resourceCase_ == 6; + } + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + * + * @return The toolset. + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.Toolset getToolset() { + if (toolsetBuilder_ == null) { + if (resourceCase_ == 6) { + return (com.google.cloud.ces.v1beta.Toolset) resource_; + } + return com.google.cloud.ces.v1beta.Toolset.getDefaultInstance(); + } else { + if (resourceCase_ == 6) { + return toolsetBuilder_.getMessage(); + } + return com.google.cloud.ces.v1beta.Toolset.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + public Builder setToolset(com.google.cloud.ces.v1beta.Toolset value) { + if (toolsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + toolsetBuilder_.setMessage(value); + } + resourceCase_ = 6; + return this; + } + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + public Builder setToolset(com.google.cloud.ces.v1beta.Toolset.Builder builderForValue) { + if (toolsetBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + toolsetBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 6; + return this; + } + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + public Builder mergeToolset(com.google.cloud.ces.v1beta.Toolset value) { + if (toolsetBuilder_ == null) { + if (resourceCase_ == 6 + && resource_ != com.google.cloud.ces.v1beta.Toolset.getDefaultInstance()) { + resource_ = + com.google.cloud.ces.v1beta.Toolset.newBuilder( + (com.google.cloud.ces.v1beta.Toolset) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 6) { + toolsetBuilder_.mergeFrom(value); + } else { + toolsetBuilder_.setMessage(value); + } + } + resourceCase_ = 6; + return this; + } + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + public Builder clearToolset() { + if (toolsetBuilder_ == null) { + if (resourceCase_ == 6) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 6) { + resourceCase_ = 0; + resource_ = null; + } + toolsetBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + public com.google.cloud.ces.v1beta.Toolset.Builder getToolsetBuilder() { + return internalGetToolsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + @java.lang.Override + public com.google.cloud.ces.v1beta.ToolsetOrBuilder getToolsetOrBuilder() { + if ((resourceCase_ == 6) && (toolsetBuilder_ != null)) { + return toolsetBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 6) { + return (com.google.cloud.ces.v1beta.Toolset) resource_; + } + return com.google.cloud.ces.v1beta.Toolset.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The toolset resource to be used by the LLM assistant, can be empty for
+     * generating a new toolset.
+     * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Toolset, + com.google.cloud.ces.v1beta.Toolset.Builder, + com.google.cloud.ces.v1beta.ToolsetOrBuilder> + internalGetToolsetFieldBuilder() { + if (toolsetBuilder_ == null) { + if (!(resourceCase_ == 6)) { + resource_ = com.google.cloud.ces.v1beta.Toolset.getDefaultInstance(); + } + toolsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.Toolset, + com.google.cloud.ces.v1beta.Toolset.Builder, + com.google.cloud.ces.v1beta.ToolsetOrBuilder>( + (com.google.cloud.ces.v1beta.Toolset) resource_, getParentForChildren(), isClean()); + resource_ = null; + } + resourceCase_ = 6; + onChanged(); + return toolsetBuilder_; + } + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The resource name of the app to generate the resource for.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the app to generate the resource for.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the app to generate the resource for.
+     * 
+ * + * + * 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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the app to generate the resource for.
+     * 
+ * + * + * 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_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the app to generate the resource for.
+     * 
+ * + * + * 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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions> + refineInstructions_ = java.util.Collections.emptyList(); + + private void ensureRefineInstructionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + refineInstructions_ = + new java.util.ArrayList< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions>( + refineInstructions_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder> + refineInstructionsBuilder_; + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRefineInstructionsList() { + if (refineInstructionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(refineInstructions_); + } else { + return refineInstructionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getRefineInstructionsCount() { + if (refineInstructionsBuilder_ == null) { + return refineInstructions_.size(); + } else { + return refineInstructionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + getRefineInstructions(int index) { + if (refineInstructionsBuilder_ == null) { + return refineInstructions_.get(index); + } else { + return refineInstructionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRefineInstructions( + int index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions value) { + if (refineInstructionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRefineInstructionsIsMutable(); + refineInstructions_.set(index, value); + onChanged(); + } else { + refineInstructionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRefineInstructions( + int index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder + builderForValue) { + if (refineInstructionsBuilder_ == null) { + ensureRefineInstructionsIsMutable(); + refineInstructions_.set(index, builderForValue.build()); + onChanged(); + } else { + refineInstructionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRefineInstructions( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions value) { + if (refineInstructionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRefineInstructionsIsMutable(); + refineInstructions_.add(value); + onChanged(); + } else { + refineInstructionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRefineInstructions( + int index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions value) { + if (refineInstructionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRefineInstructionsIsMutable(); + refineInstructions_.add(index, value); + onChanged(); + } else { + refineInstructionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRefineInstructions( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder + builderForValue) { + if (refineInstructionsBuilder_ == null) { + ensureRefineInstructionsIsMutable(); + refineInstructions_.add(builderForValue.build()); + onChanged(); + } else { + refineInstructionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRefineInstructions( + int index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder + builderForValue) { + if (refineInstructionsBuilder_ == null) { + ensureRefineInstructionsIsMutable(); + refineInstructions_.add(index, builderForValue.build()); + onChanged(); + } else { + refineInstructionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllRefineInstructions( + java.lang.Iterable< + ? extends com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions> + values) { + if (refineInstructionsBuilder_ == null) { + ensureRefineInstructionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, refineInstructions_); + onChanged(); + } else { + refineInstructionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRefineInstructions() { + if (refineInstructionsBuilder_ == null) { + refineInstructions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + refineInstructionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeRefineInstructions(int index) { + if (refineInstructionsBuilder_ == null) { + ensureRefineInstructionsIsMutable(); + refineInstructions_.remove(index); + onChanged(); + } else { + refineInstructionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder + getRefineInstructionsBuilder(int index) { + return internalGetRefineInstructionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder + getRefineInstructionsOrBuilder(int index) { + if (refineInstructionsBuilder_ == null) { + return refineInstructions_.get(index); + } else { + return refineInstructionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder> + getRefineInstructionsOrBuilderList() { + if (refineInstructionsBuilder_ != null) { + return refineInstructionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(refineInstructions_); + } + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder + addRefineInstructionsBuilder() { + return internalGetRefineInstructionsFieldBuilder() + .addBuilder( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + .getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder + addRefineInstructionsBuilder(int index) { + return internalGetRefineInstructionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions + .getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. List of refine instructions to be used to refine the resource.
+     * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder> + getRefineInstructionsBuilderList() { + return internalGetRefineInstructionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder> + internalGetRefineInstructionsFieldBuilder() { + if (refineInstructionsBuilder_ == null) { + refineInstructionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder>( + refineInstructions_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + refineInstructions_ = null; + } + return refineInstructionsBuilder_; + } + + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + toolGenerationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigOrBuilder> + toolGenerationConfigBuilder_; + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolGenerationConfig field is set. + */ + public boolean hasToolGenerationConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolGenerationConfig. + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + getToolGenerationConfig() { + if (toolGenerationConfigBuilder_ == null) { + return toolGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .getDefaultInstance() + : toolGenerationConfig_; + } else { + return toolGenerationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setToolGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig value) { + if (toolGenerationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + toolGenerationConfig_ = value; + } else { + toolGenerationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setToolGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.Builder + builderForValue) { + if (toolGenerationConfigBuilder_ == null) { + toolGenerationConfig_ = builderForValue.build(); + } else { + toolGenerationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeToolGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig value) { + if (toolGenerationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && toolGenerationConfig_ != null + && toolGenerationConfig_ + != com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .getDefaultInstance()) { + getToolGenerationConfigBuilder().mergeFrom(value); + } else { + toolGenerationConfig_ = value; + } + } else { + toolGenerationConfigBuilder_.mergeFrom(value); + } + if (toolGenerationConfig_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearToolGenerationConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + toolGenerationConfig_ = null; + if (toolGenerationConfigBuilder_ != null) { + toolGenerationConfigBuilder_.dispose(); + toolGenerationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.Builder + getToolGenerationConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetToolGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigOrBuilder + getToolGenerationConfigOrBuilder() { + if (toolGenerationConfigBuilder_ != null) { + return toolGenerationConfigBuilder_.getMessageOrBuilder(); + } else { + return toolGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + .getDefaultInstance() + : toolGenerationConfig_; + } + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the tool.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigOrBuilder> + internalGetToolGenerationConfigFieldBuilder() { + if (toolGenerationConfigBuilder_ == null) { + toolGenerationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .ToolGenerationConfigOrBuilder>( + getToolGenerationConfig(), getParentForChildren(), isClean()); + toolGenerationConfig_ = null; + } + return toolGenerationConfigBuilder_; + } + + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + appGenerationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigOrBuilder> + appGenerationConfigBuilder_; + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the appGenerationConfig field is set. + */ + public boolean hasAppGenerationConfig() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appGenerationConfig. + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + getAppGenerationConfig() { + if (appGenerationConfigBuilder_ == null) { + return appGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + .getDefaultInstance() + : appGenerationConfig_; + } else { + return appGenerationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAppGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig value) { + if (appGenerationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + appGenerationConfig_ = value; + } else { + appGenerationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAppGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.Builder + builderForValue) { + if (appGenerationConfigBuilder_ == null) { + appGenerationConfig_ = builderForValue.build(); + } else { + appGenerationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAppGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig value) { + if (appGenerationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && appGenerationConfig_ != null + && appGenerationConfig_ + != com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + .getDefaultInstance()) { + getAppGenerationConfigBuilder().mergeFrom(value); + } else { + appGenerationConfig_ = value; + } + } else { + appGenerationConfigBuilder_.mergeFrom(value); + } + if (appGenerationConfig_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAppGenerationConfig() { + bitField0_ = (bitField0_ & ~0x00000040); + appGenerationConfig_ = null; + if (appGenerationConfigBuilder_ != null) { + appGenerationConfigBuilder_.dispose(); + appGenerationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.Builder + getAppGenerationConfigBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetAppGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigOrBuilder + getAppGenerationConfigOrBuilder() { + if (appGenerationConfigBuilder_ != null) { + return appGenerationConfigBuilder_.getMessageOrBuilder(); + } else { + return appGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + .getDefaultInstance() + : appGenerationConfig_; + } + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the agents and tools.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigOrBuilder> + internalGetAppGenerationConfigFieldBuilder() { + if (appGenerationConfigBuilder_ == null) { + appGenerationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .AppGenerationConfigOrBuilder>( + getAppGenerationConfig(), getParentForChildren(), isClean()); + appGenerationConfig_ = null; + } + return appGenerationConfigBuilder_; + } + + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + evaluationGenerationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationGenerationConfigOrBuilder> + evaluationGenerationConfigBuilder_; + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationGenerationConfig field is set. + */ + public boolean hasEvaluationGenerationConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationGenerationConfig. + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + getEvaluationGenerationConfig() { + if (evaluationGenerationConfigBuilder_ == null) { + return evaluationGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .getDefaultInstance() + : evaluationGenerationConfig_; + } else { + return evaluationGenerationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEvaluationGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig value) { + if (evaluationGenerationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + evaluationGenerationConfig_ = value; + } else { + evaluationGenerationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEvaluationGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig.Builder + builderForValue) { + if (evaluationGenerationConfigBuilder_ == null) { + evaluationGenerationConfig_ = builderForValue.build(); + } else { + evaluationGenerationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEvaluationGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig value) { + if (evaluationGenerationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && evaluationGenerationConfig_ != null + && evaluationGenerationConfig_ + != com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .getDefaultInstance()) { + getEvaluationGenerationConfigBuilder().mergeFrom(value); + } else { + evaluationGenerationConfig_ = value; + } + } else { + evaluationGenerationConfigBuilder_.mergeFrom(value); + } + if (evaluationGenerationConfig_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEvaluationGenerationConfig() { + bitField0_ = (bitField0_ & ~0x00000080); + evaluationGenerationConfig_ = null; + if (evaluationGenerationConfigBuilder_ != null) { + evaluationGenerationConfigBuilder_.dispose(); + evaluationGenerationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig.Builder + getEvaluationGenerationConfigBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetEvaluationGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationGenerationConfigOrBuilder + getEvaluationGenerationConfigOrBuilder() { + if (evaluationGenerationConfigBuilder_ != null) { + return evaluationGenerationConfigBuilder_.getMessageOrBuilder(); + } else { + return evaluationGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .getDefaultInstance() + : evaluationGenerationConfig_; + } + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluations.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationGenerationConfigOrBuilder> + internalGetEvaluationGenerationConfigFieldBuilder() { + if (evaluationGenerationConfigBuilder_ == null) { + evaluationGenerationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + .Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationGenerationConfigOrBuilder>( + getEvaluationGenerationConfig(), getParentForChildren(), isClean()); + evaluationGenerationConfig_ = null; + } + return evaluationGenerationConfigBuilder_; + } + + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig + evaluationPersonasGenerationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfigOrBuilder> + evaluationPersonasGenerationConfigBuilder_; + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationPersonasGenerationConfig field is set. + */ + public boolean hasEvaluationPersonasGenerationConfig() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationPersonasGenerationConfig. + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + getEvaluationPersonasGenerationConfig() { + if (evaluationPersonasGenerationConfigBuilder_ == null) { + return evaluationPersonasGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.getDefaultInstance() + : evaluationPersonasGenerationConfig_; + } else { + return evaluationPersonasGenerationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEvaluationPersonasGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + value) { + if (evaluationPersonasGenerationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + evaluationPersonasGenerationConfig_ = value; + } else { + evaluationPersonasGenerationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEvaluationPersonasGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + .Builder + builderForValue) { + if (evaluationPersonasGenerationConfigBuilder_ == null) { + evaluationPersonasGenerationConfig_ = builderForValue.build(); + } else { + evaluationPersonasGenerationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEvaluationPersonasGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + value) { + if (evaluationPersonasGenerationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && evaluationPersonasGenerationConfig_ != null + && evaluationPersonasGenerationConfig_ + != com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.getDefaultInstance()) { + getEvaluationPersonasGenerationConfigBuilder().mergeFrom(value); + } else { + evaluationPersonasGenerationConfig_ = value; + } + } else { + evaluationPersonasGenerationConfigBuilder_.mergeFrom(value); + } + if (evaluationPersonasGenerationConfig_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEvaluationPersonasGenerationConfig() { + bitField0_ = (bitField0_ & ~0x00000100); + evaluationPersonasGenerationConfig_ = null; + if (evaluationPersonasGenerationConfigBuilder_ != null) { + evaluationPersonasGenerationConfigBuilder_.dispose(); + evaluationPersonasGenerationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + .Builder + getEvaluationPersonasGenerationConfigBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetEvaluationPersonasGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfigOrBuilder + getEvaluationPersonasGenerationConfigOrBuilder() { + if (evaluationPersonasGenerationConfigBuilder_ != null) { + return evaluationPersonasGenerationConfigBuilder_.getMessageOrBuilder(); + } else { + return evaluationPersonasGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.getDefaultInstance() + : evaluationPersonasGenerationConfig_; + } + } + + /** + * + * + *
+     * Optional. The configuration to be used to generate the evaluation personas.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfigOrBuilder> + internalGetEvaluationPersonasGenerationConfigFieldBuilder() { + if (evaluationPersonasGenerationConfigBuilder_ == null) { + evaluationPersonasGenerationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .EvaluationPersonasGenerationConfigOrBuilder>( + getEvaluationPersonasGenerationConfig(), getParentForChildren(), isClean()); + evaluationPersonasGenerationConfig_ = null; + } + return evaluationPersonasGenerationConfigBuilder_; + } + + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + qualityReportGenerationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfigOrBuilder> + qualityReportGenerationConfigBuilder_; + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the qualityReportGenerationConfig field is set. + */ + public boolean hasQualityReportGenerationConfig() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The qualityReportGenerationConfig. + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + getQualityReportGenerationConfig() { + if (qualityReportGenerationConfigBuilder_ == null) { + return qualityReportGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .getDefaultInstance() + : qualityReportGenerationConfig_; + } else { + return qualityReportGenerationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setQualityReportGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + value) { + if (qualityReportGenerationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + qualityReportGenerationConfig_ = value; + } else { + qualityReportGenerationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setQualityReportGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig.Builder + builderForValue) { + if (qualityReportGenerationConfigBuilder_ == null) { + qualityReportGenerationConfig_ = builderForValue.build(); + } else { + qualityReportGenerationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeQualityReportGenerationConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + value) { + if (qualityReportGenerationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && qualityReportGenerationConfig_ != null + && qualityReportGenerationConfig_ + != com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig.getDefaultInstance()) { + getQualityReportGenerationConfigBuilder().mergeFrom(value); + } else { + qualityReportGenerationConfig_ = value; + } + } else { + qualityReportGenerationConfigBuilder_.mergeFrom(value); + } + if (qualityReportGenerationConfig_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearQualityReportGenerationConfig() { + bitField0_ = (bitField0_ & ~0x00000200); + qualityReportGenerationConfig_ = null; + if (qualityReportGenerationConfigBuilder_ != null) { + qualityReportGenerationConfigBuilder_.dispose(); + qualityReportGenerationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .Builder + getQualityReportGenerationConfigBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetQualityReportGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfigOrBuilder + getQualityReportGenerationConfigOrBuilder() { + if (qualityReportGenerationConfigBuilder_ != null) { + return qualityReportGenerationConfigBuilder_.getMessageOrBuilder(); + } else { + return qualityReportGenerationConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .getDefaultInstance() + : qualityReportGenerationConfig_; + } + } + + /** + * + * + *
+     * Optional. The configuration to be used for quality report generation.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfigOrBuilder> + internalGetQualityReportGenerationConfigFieldBuilder() { + if (qualityReportGenerationConfigBuilder_ == null) { + qualityReportGenerationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + .Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .QualityReportGenerationConfigOrBuilder>( + getQualityReportGenerationConfig(), getParentForChildren(), isClean()); + qualityReportGenerationConfig_ = null; + } + return qualityReportGenerationConfigBuilder_; + } + + private com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + hillClimbingFixConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigOrBuilder> + hillClimbingFixConfigBuilder_; + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hillClimbingFixConfig field is set. + */ + public boolean hasHillClimbingFixConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hillClimbingFixConfig. + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + getHillClimbingFixConfig() { + if (hillClimbingFixConfigBuilder_ == null) { + return hillClimbingFixConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + .getDefaultInstance() + : hillClimbingFixConfig_; + } else { + return hillClimbingFixConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHillClimbingFixConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig value) { + if (hillClimbingFixConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hillClimbingFixConfig_ = value; + } else { + hillClimbingFixConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHillClimbingFixConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.Builder + builderForValue) { + if (hillClimbingFixConfigBuilder_ == null) { + hillClimbingFixConfig_ = builderForValue.build(); + } else { + hillClimbingFixConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHillClimbingFixConfig( + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig value) { + if (hillClimbingFixConfigBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && hillClimbingFixConfig_ != null + && hillClimbingFixConfig_ + != com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + .getDefaultInstance()) { + getHillClimbingFixConfigBuilder().mergeFrom(value); + } else { + hillClimbingFixConfig_ = value; + } + } else { + hillClimbingFixConfigBuilder_.mergeFrom(value); + } + if (hillClimbingFixConfig_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHillClimbingFixConfig() { + bitField0_ = (bitField0_ & ~0x00000400); + hillClimbingFixConfig_ = null; + if (hillClimbingFixConfigBuilder_ != null) { + hillClimbingFixConfigBuilder_.dispose(); + hillClimbingFixConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.Builder + getHillClimbingFixConfigBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetHillClimbingFixConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigOrBuilder + getHillClimbingFixConfigOrBuilder() { + if (hillClimbingFixConfigBuilder_ != null) { + return hillClimbingFixConfigBuilder_.getMessageOrBuilder(); + } else { + return hillClimbingFixConfig_ == null + ? com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + .getDefaultInstance() + : hillClimbingFixConfig_; + } + } + + /** + * + * + *
+     * Optional. The configuration to be used for hill climbing fixes.
+     * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig.Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigOrBuilder> + internalGetHillClimbingFixConfigFieldBuilder() { + if (hillClimbingFixConfigBuilder_ == null) { + hillClimbingFixConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + .Builder, + com.google.cloud.ces.v1beta.GenerateAppResourceRequest + .HillClimbingFixConfigOrBuilder>( + getHillClimbingFixConfig(), getParentForChildren(), isClean()); + hillClimbingFixConfig_ = null; + } + return hillClimbingFixConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ces.v1beta.GenerateAppResourceRequest) + private static final com.google.cloud.ces.v1beta.GenerateAppResourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ces.v1beta.GenerateAppResourceRequest(); + } + + public static com.google.cloud.ces.v1beta.GenerateAppResourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateAppResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.ces.v1beta.GenerateAppResourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceRequestOrBuilder.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceRequestOrBuilder.java new file mode 100644 index 000000000000..f3fc3328054d --- /dev/null +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GenerateAppResourceRequestOrBuilder.java @@ -0,0 +1,521 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/ces/v1beta/agent_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.ces.v1beta; + +@com.google.protobuf.Generated +public interface GenerateAppResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ces.v1beta.GenerateAppResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The agent resource to be used by the LLM assistant, can be empty for
+   * generating a new agent.
+   * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + * + * @return Whether the agent field is set. + */ + boolean hasAgent(); + + /** + * + * + *
+   * The agent resource to be used by the LLM assistant, can be empty for
+   * generating a new agent.
+   * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + * + * @return The agent. + */ + com.google.cloud.ces.v1beta.Agent getAgent(); + + /** + * + * + *
+   * The agent resource to be used by the LLM assistant, can be empty for
+   * generating a new agent.
+   * 
+ * + * .google.cloud.ces.v1beta.Agent agent = 2; + */ + com.google.cloud.ces.v1beta.AgentOrBuilder getAgentOrBuilder(); + + /** + * + * + *
+   * The tool resource to be used by the LLM assistant, can be empty for
+   * generating a new tool.
+   * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + * + * @return Whether the tool field is set. + */ + boolean hasTool(); + + /** + * + * + *
+   * The tool resource to be used by the LLM assistant, can be empty for
+   * generating a new tool.
+   * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + * + * @return The tool. + */ + com.google.cloud.ces.v1beta.Tool getTool(); + + /** + * + * + *
+   * The tool resource to be used by the LLM assistant, can be empty for
+   * generating a new tool.
+   * 
+ * + * .google.cloud.ces.v1beta.Tool tool = 4; + */ + com.google.cloud.ces.v1beta.ToolOrBuilder getToolOrBuilder(); + + /** + * + * + *
+   * The toolset resource to be used by the LLM assistant, can be empty for
+   * generating a new toolset.
+   * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + * + * @return Whether the toolset field is set. + */ + boolean hasToolset(); + + /** + * + * + *
+   * The toolset resource to be used by the LLM assistant, can be empty for
+   * generating a new toolset.
+   * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + * + * @return The toolset. + */ + com.google.cloud.ces.v1beta.Toolset getToolset(); + + /** + * + * + *
+   * The toolset resource to be used by the LLM assistant, can be empty for
+   * generating a new toolset.
+   * 
+ * + * .google.cloud.ces.v1beta.Toolset toolset = 6; + */ + com.google.cloud.ces.v1beta.ToolsetOrBuilder getToolsetOrBuilder(); + + /** + * + * + *
+   * Required. The resource name of the app to generate the resource for.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The resource name of the app to generate the resource for.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getRefineInstructionsList(); + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions getRefineInstructions( + int index); + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getRefineInstructionsCount(); + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder> + getRefineInstructionsOrBuilderList(); + + /** + * + * + *
+   * Optional. List of refine instructions to be used to refine the resource.
+   * 
+ * + * + * repeated .google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructions refine_instructions = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.RefineInstructionsOrBuilder + getRefineInstructionsOrBuilder(int index); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the tool.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolGenerationConfig field is set. + */ + boolean hasToolGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the tool.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolGenerationConfig. + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig + getToolGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the tool.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfig tool_generation_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ToolGenerationConfigOrBuilder + getToolGenerationConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the agents and tools.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the appGenerationConfig field is set. + */ + boolean hasAppGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the agents and tools.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The appGenerationConfig. + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig + getAppGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the agents and tools.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfig app_generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.AppGenerationConfigOrBuilder + getAppGenerationConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluations.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationGenerationConfig field is set. + */ + boolean hasEvaluationGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluations.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationGenerationConfig. + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig + getEvaluationGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluations.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfig evaluation_generation_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationGenerationConfigOrBuilder + getEvaluationGenerationConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluation personas.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the evaluationPersonasGenerationConfig field is set. + */ + boolean hasEvaluationPersonasGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluation personas.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The evaluationPersonasGenerationConfig. + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig + getEvaluationPersonasGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used to generate the evaluation personas.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.EvaluationPersonasGenerationConfigOrBuilder + getEvaluationPersonasGenerationConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration to be used for quality report generation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the qualityReportGenerationConfig field is set. + */ + boolean hasQualityReportGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used for quality report generation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The qualityReportGenerationConfig. + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig + getQualityReportGenerationConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used for quality report generation.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfig quality_report_generation_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.QualityReportGenerationConfigOrBuilder + getQualityReportGenerationConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration to be used for hill climbing fixes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hillClimbingFixConfig field is set. + */ + boolean hasHillClimbingFixConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used for hill climbing fixes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hillClimbingFixConfig. + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig + getHillClimbingFixConfig(); + + /** + * + * + *
+   * Optional. The configuration to be used for hill climbing fixes.
+   * 
+ * + * + * .google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfig hill_climbing_fix_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.HillClimbingFixConfigOrBuilder + getHillClimbingFixConfigOrBuilder(); + + com.google.cloud.ces.v1beta.GenerateAppResourceRequest.ResourceCase getResourceCase(); +} diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GetConversationRequest.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GetConversationRequest.java index a3270cd85633..ff37d45f68af 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GetConversationRequest.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GetConversationRequest.java @@ -145,7 +145,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @return The enum numeric value on the wire for source. */ @java.lang.Override @@ -167,7 +167,7 @@ public int getSourceValue() { * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @return The source. */ @java.lang.Override @@ -647,7 +647,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @return The enum numeric value on the wire for source. */ @java.lang.Override @@ -669,7 +669,7 @@ public int getSourceValue() { * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @param value The enum numeric value on the wire for source to set. * @return This builder for chaining. */ @@ -694,7 +694,7 @@ public Builder setSourceValue(int value) { * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @return The source. */ @java.lang.Override @@ -718,7 +718,7 @@ public com.google.cloud.ces.v1beta.Conversation.Source getSource() { * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @param value The source to set. * @return This builder for chaining. */ @@ -746,7 +746,7 @@ public Builder setSource(com.google.cloud.ces.v1beta.Conversation.Source value) * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GetConversationRequestOrBuilder.java b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GetConversationRequestOrBuilder.java index 7749524d95a9..37940eac39e1 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GetConversationRequestOrBuilder.java +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/java/com/google/cloud/ces/v1beta/GetConversationRequestOrBuilder.java @@ -69,7 +69,7 @@ public interface GetConversationRequestOrBuilder * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @return The enum numeric value on the wire for source. */ @java.lang.Deprecated @@ -88,7 +88,7 @@ public interface GetConversationRequestOrBuilder * * * @deprecated google.cloud.ces.v1beta.GetConversationRequest.source is deprecated. See - * google/cloud/ces/v1beta/agent_service.proto;l=1172 + * google/cloud/ces/v1beta/agent_service.proto;l=1188 * @return The source. */ @java.lang.Deprecated diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/agent_service.proto b/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/agent_service.proto index db9661b816a3..ec33baeda5d2 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/agent_service.proto +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/agent_service.proto @@ -28,6 +28,7 @@ import "google/cloud/ces/v1beta/conversation.proto"; import "google/cloud/ces/v1beta/deployment.proto"; import "google/cloud/ces/v1beta/evaluation.proto"; import "google/cloud/ces/v1beta/example.proto"; +import "google/cloud/ces/v1beta/file_context.proto"; import "google/cloud/ces/v1beta/guardrail.proto"; import "google/cloud/ces/v1beta/security_settings.proto"; import "google/cloud/ces/v1beta/tool.proto"; @@ -36,6 +37,7 @@ import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; option go_package = "cloud.google.com/go/ces/apiv1beta/cespb;cespb"; option java_multiple_files = true; @@ -502,6 +504,20 @@ service AgentService { }; } + // Generates specific resources (e.g. agent) in the app using LLM assistant. + rpc GenerateAppResource(GenerateAppResourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/apps/*}:generateAppResource" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "GenerateAppResourceResponse" + metadata_type: "GenerateAppResourceOperationMetadata" + }; + } + // Lists the changelogs of the specified app. rpc ListChangelogs(ListChangelogsRequest) returns (ListChangelogsResponse) { option (google.api.http) = { @@ -1657,6 +1673,194 @@ message RestoreAppVersionRequest { // [AgentService.RestoreAppVersion][google.cloud.ces.v1beta.AgentService.RestoreAppVersion] message RestoreAppVersionResponse {} +// Request message for +// [AgentService.GenerateAppResource][google.cloud.ces.v1beta.AgentService.GenerateAppResource]. +message GenerateAppResourceRequest { + // The instructions to be used to refine a part of the resource. The part of + // the resource can be specified with a start index, end index and a field + // mask. For example, if you want to refine a part of the agent instructions + // you can specify the index of the first character of the instructions, the + // index of the last character of the instructions and the field mask as + // "instructions". + message RefineInstructions { + // Required. The first character (inclusive) of the text to refine. + int64 start_index = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The last character (inclusive) of the text to refine. + int64 end_index = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The field of the resource being refined. Only one field is + // allowed per RefineInstructions. If refining agent instructions, the field + // mask should be "instructions". + google.protobuf.FieldMask field_mask = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The instructions to refine the resource. + string instructions = 4 [(google.api.field_behavior) = REQUIRED]; + } + + // The configuration to be used to generate a tool. + message ToolGenerationConfig { + // The configuration to be used to generate an Open API schema. + message OpenApiToolsetGenerationConfig { + // The configuration to be used to generate an operation in the Open API + // schema. + message OperationGenerationConfig { + // Required. The uri of the tool. This should include query and path + // parameters if any. + string method = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The path of the tool to be appended to the base uri. This + // should include query and path parameters if any. + string path = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A sample request to the tool in JSON format. Skip if the + // tool does not support request body. + string request_json = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. A sample response from the tool in JSON format. + string response_json = 4 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. The base uri of the tool. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of operations to be added to the Open API schema. + repeated OperationGenerationConfig operation_generation_configs = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. The context which describes the tool to be generated. This can + // be empty if the tool request & response are provided. + string context = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The files to be used as context. + repeated FileContext file_contexts = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration to be used to generate an Open API schema. + OpenApiToolsetGenerationConfig open_api_toolset_generation_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The configuration to be used to generate the app. + message AppGenerationConfig { + // Optional. The context which describes the requirements of the agents & + // tools to be generated. + string context = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The files to be used as context. + repeated FileContext file_contexts = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The insights dataset to be used to fetch conversation data for + // generating the agents & tools. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}`. + string dataset_id = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Dataset" + } + ]; + + // Optional. Whether to generate the evaluations for the app. If true, the + // provided context will be used to generate the evaluations data. + bool generate_evaluations = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage location to store the generated question + // answer data to be used by the Datastore tool. This data is generated only + // when using conversation data as an input source. The location must be + // in the same project as the app. + // Format: `gs://...`. + string gcs_location = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // The configuration to be used to generate the evaluations. + message EvaluationGenerationConfig { + // Optional. The insights dataset to be used to fetch conversation data for + // generating the evaluations. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}`. + string dataset_id = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Dataset" + } + ]; + } + + // The configuration to be used to generate the evaluation personas. + message EvaluationPersonasGenerationConfig {} + + // The configuration to be used for quality report generation. + message QualityReportGenerationConfig { + // Required. The evaluation run used to inform quality report analysis. + string evaluation_run = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "ces.googleapis.com/EvaluationRun" + } + ]; + } + + // The configuration to be used for hill climbing fixes. + message HillClimbingFixConfig { + // Required. The quality report used to inform the instruction following + // fix. + QualityReport quality_report = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The resource to generate. + oneof resource { + // The agent resource to be used by the LLM assistant, can be empty for + // generating a new agent. + Agent agent = 2; + + // The tool resource to be used by the LLM assistant, can be empty for + // generating a new tool. + Tool tool = 4; + + // The toolset resource to be used by the LLM assistant, can be empty for + // generating a new toolset. + Toolset toolset = 6; + } + + // Required. The resource name of the app to generate the resource for. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ces.googleapis.com/App" } + ]; + + // Optional. List of refine instructions to be used to refine the resource. + repeated RefineInstructions refine_instructions = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration to be used to generate the tool. + ToolGenerationConfig tool_generation_config = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration to be used to generate the agents and tools. + AppGenerationConfig app_generation_config = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration to be used to generate the evaluations. + EvaluationGenerationConfig evaluation_generation_config = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration to be used to generate the evaluation personas. + EvaluationPersonasGenerationConfig evaluation_personas_generation_config = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration to be used for quality report generation. + QualityReportGenerationConfig quality_report_generation_config = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration to be used for hill climbing fixes. + HillClimbingFixConfig hill_climbing_fix_config = 11 + [(google.api.field_behavior) = OPTIONAL]; +} + // Response message for // [AgentService.GenerateAppResource][google.cloud.ces.v1beta.AgentService.GenerateAppResource]. message GenerateAppResourceResponse { @@ -1756,6 +1960,66 @@ message QualityReport { repeated Issue general_issues = 3 [(google.api.field_behavior) = OPTIONAL]; } +// Operation metadata for +// [AgentService.GenerateAppResource][google.cloud.ces.v1beta.AgentService.GenerateAppResource]. +message GenerateAppResourceOperationMetadata { + // The type of the generation operation. + enum GenerationType { + // Unspecified operation type. + GENERATION_TYPE_UNSPECIFIED = 0; + + // Agent instruction restructure type. + AGENT_RESTRUCTURE = 1; + + // Agent instruction refinement type. + AGENT_REFINE = 2; + + // Agent creation from type. + AGENT_CREATE = 3; + + // Tool creation type. + TOOL_CREATE = 4; + + // Scenario creation type. + SCENARIO_CREATE = 5; + + // Scenario creation from transcripts type. + SCENARIO_CREATE_FROM_TRANSCRIPTS = 7; + + // Evaluation persona generation type. + EVALUATION_PERSONA_CREATE = 6; + + // Quality report generation type. + QUALITY_REPORT_CREATE = 8; + + // Instruction following fix type (used for hill climbing fixes). + INSTRUCTION_FOLLOWING_FIX = 9; + } + + // Output only. The type of the operation. + GenerationType generation_type = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the app that the operation is associated + // with. Format: `projects/{project}/locations/{location}/apps/{app}`. + string target = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error messages from the resource generation process. + repeated google.rpc.Status partial_errors = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Request message for // [AgentService.ListChangelogs][google.cloud.ces.v1beta.AgentService.ListChangelogs]. message ListChangelogsRequest { diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/agent_tool.proto b/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/agent_tool.proto index 7e14d6ffe119..92e845c8a138 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/agent_tool.proto +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/agent_tool.proto @@ -32,9 +32,18 @@ message AgentTool { // Optional. Description of the tool's purpose. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The resource name of the root agent that is the entry point of - // the tool. Format: `projects/{project}/locations/{location}/agents/{agent}` + // Optional. Deprecated: Use `agent` instead. + // The resource name of the root agent that is the entry point of the tool. + // Format: `projects/{project}/locations/{location}/agents/{agent}` string root_agent = 3 [ + deprecated = true, + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "ces.googleapis.com/Agent" } + ]; + + // Optional. The resource name of the agent that is the entry point of the + // tool. Format: `projects/{project}/locations/{location}/agents/{agent}` + string agent = 4 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "ces.googleapis.com/Agent" } ]; diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/conversation.proto b/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/conversation.proto index 6b4b01e2d217..71227c03a782 100644 --- a/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/conversation.proto +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/conversation.proto @@ -77,6 +77,10 @@ message Conversation { // The conversation is from the evaluation. EVAL = 3; + + // The conversation is from an agent tool. Agent tool runs the agent in a + // separate session, which is persisted for testing and debugging purposes. + AGENT_TOOL = 4; } // Type of the input message. diff --git a/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/file_context.proto b/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/file_context.proto new file mode 100644 index 000000000000..b32831cca697 --- /dev/null +++ b/java-ces/proto-google-cloud-ces-v1beta/src/main/proto/google/cloud/ces/v1beta/file_context.proto @@ -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 +// +// 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.ces.v1beta; + +import "google/api/field_behavior.proto"; + +option go_package = "cloud.google.com/go/ces/apiv1beta/cespb;cespb"; +option java_multiple_files = true; +option java_outer_classname = "FileContextProto"; +option java_package = "com.google.cloud.ces.v1beta"; + +// Files to be used as context. Files can be provided as raw bytes. +message FileContext { + // File provided as raw bytes. + message FileBytes { + // Required. The name of the file provided as raw bytes. + string file_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The IANA standard MIME type of the source data. + string mime_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Raw bytes of the file. + bytes data = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // File provided as context. + oneof file { + // Optional. File provided as raw bytes. + FileBytes file_bytes = 1 [(google.api.field_behavior) = OPTIONAL]; + } +} diff --git a/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/AsyncGenerateAppResource.java b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/AsyncGenerateAppResource.java new file mode 100644 index 000000000000..eb29d85286dd --- /dev/null +++ b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/AsyncGenerateAppResource.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ces.v1beta.samples; + +// [START ces_v1beta_generated_AgentService_GenerateAppResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ces.v1beta.AgentServiceClient; +import com.google.cloud.ces.v1beta.AppName; +import com.google.cloud.ces.v1beta.GenerateAppResourceRequest; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncGenerateAppResource { + + public static void main(String[] args) throws Exception { + asyncGenerateAppResource(); + } + + public static void asyncGenerateAppResource() 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) { + GenerateAppResourceRequest request = + GenerateAppResourceRequest.newBuilder() + .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString()) + .addAllRefineInstructions( + new ArrayList()) + .setToolGenerationConfig( + GenerateAppResourceRequest.ToolGenerationConfig.newBuilder().build()) + .setAppGenerationConfig( + GenerateAppResourceRequest.AppGenerationConfig.newBuilder().build()) + .setEvaluationGenerationConfig( + GenerateAppResourceRequest.EvaluationGenerationConfig.newBuilder().build()) + .setEvaluationPersonasGenerationConfig( + GenerateAppResourceRequest.EvaluationPersonasGenerationConfig.newBuilder() + .build()) + .setQualityReportGenerationConfig( + GenerateAppResourceRequest.QualityReportGenerationConfig.newBuilder().build()) + .setHillClimbingFixConfig( + GenerateAppResourceRequest.HillClimbingFixConfig.newBuilder().build()) + .build(); + ApiFuture future = + agentServiceClient.generateAppResourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END ces_v1beta_generated_AgentService_GenerateAppResource_async] diff --git a/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/AsyncGenerateAppResourceLRO.java b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/AsyncGenerateAppResourceLRO.java new file mode 100644 index 000000000000..a23e004087df --- /dev/null +++ b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/AsyncGenerateAppResourceLRO.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. + */ + +package com.google.cloud.ces.v1beta.samples; + +// [START ces_v1beta_generated_AgentService_GenerateAppResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ces.v1beta.AgentServiceClient; +import com.google.cloud.ces.v1beta.AppName; +import com.google.cloud.ces.v1beta.GenerateAppResourceOperationMetadata; +import com.google.cloud.ces.v1beta.GenerateAppResourceRequest; +import com.google.cloud.ces.v1beta.GenerateAppResourceResponse; +import java.util.ArrayList; + +public class AsyncGenerateAppResourceLRO { + + public static void main(String[] args) throws Exception { + asyncGenerateAppResourceLRO(); + } + + public static void asyncGenerateAppResourceLRO() 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) { + GenerateAppResourceRequest request = + GenerateAppResourceRequest.newBuilder() + .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString()) + .addAllRefineInstructions( + new ArrayList()) + .setToolGenerationConfig( + GenerateAppResourceRequest.ToolGenerationConfig.newBuilder().build()) + .setAppGenerationConfig( + GenerateAppResourceRequest.AppGenerationConfig.newBuilder().build()) + .setEvaluationGenerationConfig( + GenerateAppResourceRequest.EvaluationGenerationConfig.newBuilder().build()) + .setEvaluationPersonasGenerationConfig( + GenerateAppResourceRequest.EvaluationPersonasGenerationConfig.newBuilder() + .build()) + .setQualityReportGenerationConfig( + GenerateAppResourceRequest.QualityReportGenerationConfig.newBuilder().build()) + .setHillClimbingFixConfig( + GenerateAppResourceRequest.HillClimbingFixConfig.newBuilder().build()) + .build(); + OperationFuture future = + agentServiceClient.generateAppResourceOperationCallable().futureCall(request); + // Do something. + GenerateAppResourceResponse response = future.get(); + } + } +} +// [END ces_v1beta_generated_AgentService_GenerateAppResource_LRO_async] diff --git a/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResource.java b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResource.java new file mode 100644 index 000000000000..eeed7b24761b --- /dev/null +++ b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResource.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.ces.v1beta.samples; + +// [START ces_v1beta_generated_AgentService_GenerateAppResource_sync] +import com.google.cloud.ces.v1beta.AgentServiceClient; +import com.google.cloud.ces.v1beta.AppName; +import com.google.cloud.ces.v1beta.GenerateAppResourceRequest; +import com.google.cloud.ces.v1beta.GenerateAppResourceResponse; +import java.util.ArrayList; + +public class SyncGenerateAppResource { + + public static void main(String[] args) throws Exception { + syncGenerateAppResource(); + } + + public static void syncGenerateAppResource() 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) { + GenerateAppResourceRequest request = + GenerateAppResourceRequest.newBuilder() + .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString()) + .addAllRefineInstructions( + new ArrayList()) + .setToolGenerationConfig( + GenerateAppResourceRequest.ToolGenerationConfig.newBuilder().build()) + .setAppGenerationConfig( + GenerateAppResourceRequest.AppGenerationConfig.newBuilder().build()) + .setEvaluationGenerationConfig( + GenerateAppResourceRequest.EvaluationGenerationConfig.newBuilder().build()) + .setEvaluationPersonasGenerationConfig( + GenerateAppResourceRequest.EvaluationPersonasGenerationConfig.newBuilder() + .build()) + .setQualityReportGenerationConfig( + GenerateAppResourceRequest.QualityReportGenerationConfig.newBuilder().build()) + .setHillClimbingFixConfig( + GenerateAppResourceRequest.HillClimbingFixConfig.newBuilder().build()) + .build(); + GenerateAppResourceResponse response = + agentServiceClient.generateAppResourceAsync(request).get(); + } + } +} +// [END ces_v1beta_generated_AgentService_GenerateAppResource_sync] diff --git a/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResourceAppname.java b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResourceAppname.java new file mode 100644 index 000000000000..d6a5e657b473 --- /dev/null +++ b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResourceAppname.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.ces.v1beta.samples; + +// [START ces_v1beta_generated_AgentService_GenerateAppResource_Appname_sync] +import com.google.cloud.ces.v1beta.AgentServiceClient; +import com.google.cloud.ces.v1beta.AppName; +import com.google.cloud.ces.v1beta.GenerateAppResourceResponse; + +public class SyncGenerateAppResourceAppname { + + public static void main(String[] args) throws Exception { + syncGenerateAppResourceAppname(); + } + + public static void syncGenerateAppResourceAppname() 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) { + AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]"); + GenerateAppResourceResponse response = + agentServiceClient.generateAppResourceAsync(parent).get(); + } + } +} +// [END ces_v1beta_generated_AgentService_GenerateAppResource_Appname_sync] diff --git a/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResourceString.java b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResourceString.java new file mode 100644 index 000000000000..b48413eb2ccd --- /dev/null +++ b/java-ces/samples/snippets/generated/com/google/cloud/ces/v1beta/agentservice/generateappresource/SyncGenerateAppResourceString.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.ces.v1beta.samples; + +// [START ces_v1beta_generated_AgentService_GenerateAppResource_String_sync] +import com.google.cloud.ces.v1beta.AgentServiceClient; +import com.google.cloud.ces.v1beta.AppName; +import com.google.cloud.ces.v1beta.GenerateAppResourceResponse; + +public class SyncGenerateAppResourceString { + + public static void main(String[] args) throws Exception { + syncGenerateAppResourceString(); + } + + public static void syncGenerateAppResourceString() 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) { + String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString(); + GenerateAppResourceResponse response = + agentServiceClient.generateAppResourceAsync(parent).get(); + } + } +} +// [END ces_v1beta_generated_AgentService_GenerateAppResource_String_sync] diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java index 52957f2b1f9f..b36fe40cb319 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java @@ -98,7 +98,7 @@ *

ListMessages *

Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. System messages, like those announcing new space members, aren't included. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, `{}`. For an example, see [List messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). *

Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - *

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) with the authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication scope, this method only returns public messages in a space. It doesn't include private messages. + *

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication scope, this method only returns public messages in a space. It doesn't include private messages. *

- [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) * *

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

@@ -166,7 +166,7 @@ *

GetMessage *

Returns details about a message. For an example, see [Get details about a message](https://developers.google.com/workspace/chat/get-messages). *

Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - *

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.bot`: When using this authorization scope, this method returns details about a message the Chat app has access to, like direct messages and [slash commands](https://developers.google.com/workspace/chat/slash-commands) that invoke the Chat app. - `https://www.googleapis.com/auth/chat.app.messages.readonly` with [administrator approval](https://support.google.com/a?p=chat-app-auth) (available in [Developer Preview](https://developers.google.com/workspace/preview)). When using this authentication scope, this method returns details about a public message in a space. + *

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.bot`: When using this authorization scope, this method returns details about a message the Chat app has access to, like direct messages and [slash commands](https://developers.google.com/workspace/chat/slash-commands) that invoke the Chat app. - `https://www.googleapis.com/auth/chat.app.messages.readonly` with [administrator approval](https://support.google.com/a?p=chat-app-auth). When using this authentication scope, this method returns details about a public message in a space. *

- [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` *

Note: Might return a message from a blocked member or space. * @@ -760,7 +760,7 @@ *

Returns an event from a Google Chat space. The [event payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload. *

Note: The `permissionSettings` field is not returned in the Space object of the Space event data for this request. *

Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) with an [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) appropriate for reading the requested data: - *

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - `https://www.googleapis.com/auth/chat.app.messages.readonly` - `https://www.googleapis.com/auth/chat.app.memberships` + *

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - `https://www.googleapis.com/auth/chat.app.spaces.readonly` - `https://www.googleapis.com/auth/chat.app.messages.readonly` - `https://www.googleapis.com/auth/chat.app.memberships` - `https://www.googleapis.com/auth/chat.app.memberships.readonly` *

- [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces.readonly` - `https://www.googleapis.com/auth/chat.spaces` - `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` - `https://www.googleapis.com/auth/chat.messages.reactions` - `https://www.googleapis.com/auth/chat.memberships.readonly` - `https://www.googleapis.com/auth/chat.memberships` *

To get an event, the authenticated caller must be a member of the space. *

For an example, see [Get details about an event from a Google Chat space](https://developers.google.com/workspace/chat/get-space-event). @@ -784,7 +784,7 @@ *

ListSpaceEvents *

Lists events from a Google Chat space. For each event, the [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns `Membership` resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty `Membership` resource. *

Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) with an [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) appropriate for reading the requested data: - *

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - `https://www.googleapis.com/auth/chat.app.messages.readonly` - `https://www.googleapis.com/auth/chat.app.memberships` + *

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - `https://www.googleapis.com/auth/chat.app.spaces.readonly` - `https://www.googleapis.com/auth/chat.app.messages.readonly` - `https://www.googleapis.com/auth/chat.app.memberships` - `https://www.googleapis.com/auth/chat.app.memberships.readonly` *

- [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces.readonly` - `https://www.googleapis.com/auth/chat.spaces` - `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` - `https://www.googleapis.com/auth/chat.messages.reactions` - `https://www.googleapis.com/auth/chat.memberships.readonly` - `https://www.googleapis.com/auth/chat.memberships` *

To list events, the authenticated caller must be a member of the space. *

For an example, see [List events from a Google Chat space](https://developers.google.com/workspace/chat/list-space-events). @@ -846,6 +846,154 @@ * * * + * + *

CreateSection + *

Creates a section in Google Chat. Sections help users group conversations and customize the list of spaces displayed in Chat navigation panel. Only sections of type `CUSTOM_SECTION` can be created. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

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

+ *
    + *
  • createSection(CreateSectionRequest request) + *

+ *

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

+ *
    + *
  • createSection(UserName parent, Section section) + *

  • createSection(String parent, Section section) + *

+ *

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

+ *
    + *
  • createSectionCallable() + *

+ * + * + * + *

DeleteSection + *

Deletes a section of type `CUSTOM_SECTION`. + *

If the section contains items, such as spaces, the items are moved to Google Chat's default sections and are not deleted. + *

For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

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

+ *
    + *
  • deleteSection(DeleteSectionRequest request) + *

+ *

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

+ *
    + *
  • deleteSection(SectionName name) + *

  • deleteSection(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.

+ *
    + *
  • deleteSectionCallable() + *

+ * + * + * + *

UpdateSection + *

Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

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

+ *
    + *
  • updateSection(UpdateSectionRequest request) + *

+ *

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

+ *
    + *
  • updateSection(Section section, 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.

+ *
    + *
  • updateSectionCallable() + *

+ * + * + * + *

ListSections + *

Lists sections available to the Chat user. Sections help users group their conversations and customize the list of spaces displayed in Chat navigation panel. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.users.sections` - `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

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

+ *
    + *
  • listSections(ListSectionsRequest request) + *

+ *

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

+ *
    + *
  • listSections(UserName parent) + *

  • listSections(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.

+ *
    + *
  • listSectionsPagedCallable() + *

  • listSectionsCallable() + *

+ * + * + * + *

PositionSection + *

Changes the sort order of a section. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

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

+ *
    + *
  • positionSection(PositionSectionRequest request) + *

+ *

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

+ *
    + *
  • positionSectionCallable() + *

+ * + * + * + *

ListSectionItems + *

Lists items in a section. + *

Only spaces can be section items. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.users.sections` - `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

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

+ *
    + *
  • listSectionItems(ListSectionItemsRequest request) + *

+ *

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

+ *
    + *
  • listSectionItems(SectionName parent) + *

  • listSectionItems(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.

+ *
    + *
  • listSectionItemsPagedCallable() + *

  • listSectionItemsCallable() + *

+ * + * + * + *

MoveSectionItem + *

Moves an item from one section to another. For example, if a section contains spaces, this method can be used to move a space to a different section. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

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

+ *
    + *
  • moveSectionItem(MoveSectionItemRequest request) + *

+ *

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

+ *
    + *
  • moveSectionItem(SectionItemName name, SectionName targetSection) + *

  • moveSectionItem(SectionItemName name, String targetSection) + *

  • moveSectionItem(String name, SectionName targetSection) + *

  • moveSectionItem(String name, String targetSection) + *

+ *

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

+ *
    + *
  • moveSectionItemCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -1265,11 +1413,10 @@ public final UnaryCallable createMessageCallable( * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with the authorization scope: - - * `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication - * scope, this method only returns public messages in a space. It doesn't include private - * messages. + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the + * authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using + * this authentication scope, this method only returns public messages in a space. It doesn't + * include private messages. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -1319,11 +1466,10 @@ public final ListMessagesPagedResponse listMessages(SpaceName parent) { * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with the authorization scope: - - * `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication - * scope, this method only returns public messages in a space. It doesn't include private - * messages. + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the + * authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using + * this authentication scope, this method only returns public messages in a space. It doesn't + * include private messages. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -1370,11 +1516,10 @@ public final ListMessagesPagedResponse listMessages(String parent) { * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with the authorization scope: - - * `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication - * scope, this method only returns public messages in a space. It doesn't include private - * messages. + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the + * authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using + * this authentication scope, this method only returns public messages in a space. It doesn't + * include private messages. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -1427,11 +1572,10 @@ public final ListMessagesPagedResponse listMessages(ListMessagesRequest request) * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with the authorization scope: - - * `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication - * scope, this method only returns public messages in a space. It doesn't include private - * messages. + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the + * authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using + * this authentication scope, this method only returns public messages in a space. It doesn't + * include private messages. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -1484,11 +1628,10 @@ public final ListMessagesPagedResponse listMessages(ListMessagesRequest request) * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with the authorization scope: - - * `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication - * scope, this method only returns public messages in a space. It doesn't include private - * messages. + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the + * authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using + * this authentication scope, this method only returns public messages in a space. It doesn't + * include private messages. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -2066,9 +2209,8 @@ public final UnaryCallable getMembershipCallab * has access to, like direct messages and [slash * commands](https://developers.google.com/workspace/chat/slash-commands) that invoke the Chat * app. - `https://www.googleapis.com/auth/chat.app.messages.readonly` with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in [Developer - * Preview](https://developers.google.com/workspace/preview)). When using this authentication - * scope, this method returns details about a public message in a space. + * approval](https://support.google.com/a?p=chat-app-auth). When using this authentication scope, + * this method returns details about a public message in a space. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -2120,9 +2262,8 @@ public final Message getMessage(MessageName name) { * has access to, like direct messages and [slash * commands](https://developers.google.com/workspace/chat/slash-commands) that invoke the Chat * app. - `https://www.googleapis.com/auth/chat.app.messages.readonly` with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in [Developer - * Preview](https://developers.google.com/workspace/preview)). When using this authentication - * scope, this method returns details about a public message in a space. + * approval](https://support.google.com/a?p=chat-app-auth). When using this authentication scope, + * this method returns details about a public message in a space. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -2173,9 +2314,8 @@ public final Message getMessage(String name) { * has access to, like direct messages and [slash * commands](https://developers.google.com/workspace/chat/slash-commands) that invoke the Chat * app. - `https://www.googleapis.com/auth/chat.app.messages.readonly` with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in [Developer - * Preview](https://developers.google.com/workspace/preview)). When using this authentication - * scope, this method returns details about a public message in a space. + * approval](https://support.google.com/a?p=chat-app-auth). When using this authentication scope, + * this method returns details about a public message in a space. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -2224,9 +2364,8 @@ public final Message getMessage(GetMessageRequest request) { * has access to, like direct messages and [slash * commands](https://developers.google.com/workspace/chat/slash-commands) that invoke the Chat * app. - `https://www.googleapis.com/auth/chat.app.messages.readonly` with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in [Developer - * Preview](https://developers.google.com/workspace/preview)). When using this authentication - * scope, this method returns details about a public message in a space. + * approval](https://support.google.com/a?p=chat-app-auth). When using this authentication scope, + * this method returns details about a public message in a space. * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -6749,11 +6888,12 @@ public final ThreadReadState getThreadReadState(GetThreadReadStateRequest reques * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -6815,11 +6955,12 @@ public final SpaceEvent getSpaceEvent(SpaceEventName name) { * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -6880,11 +7021,12 @@ public final SpaceEvent getSpaceEvent(String name) { * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -6946,11 +7088,12 @@ public final SpaceEvent getSpaceEvent(GetSpaceEventRequest request) { * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -7009,11 +7152,12 @@ public final UnaryCallable getSpaceEventCallab * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -7110,11 +7254,12 @@ public final ListSpaceEventsPagedResponse listSpaceEvents(SpaceName parent, Stri * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -7208,11 +7353,12 @@ public final ListSpaceEventsPagedResponse listSpaceEvents(String parent, String * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -7277,11 +7423,12 @@ public final ListSpaceEventsPagedResponse listSpaceEvents(ListSpaceEventsRequest * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -7347,11 +7494,12 @@ public final ListSpaceEventsPagedResponse listSpaceEvents(ListSpaceEventsRequest * *

- [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer - * Preview](https://developers.google.com/workspace/preview) with one of the following - * authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the + * following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - + * `https://www.googleapis.com/auth/chat.app.spaces.readonly` - * `https://www.googleapis.com/auth/chat.app.messages.readonly` - - * `https://www.googleapis.com/auth/chat.app.memberships` + * `https://www.googleapis.com/auth/chat.app.memberships` - + * `https://www.googleapis.com/auth/chat.app.memberships.readonly` * *

- [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -7688,56 +7836,1264 @@ public final SpaceNotificationSetting updateSpaceNotificationSetting( return stub.updateSpaceNotificationSettingCallable(); } - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a section in Google Chat. Sections help users group conversations and customize the + * list of spaces displayed in Chat navigation panel. Only sections of type `CUSTOM_SECTION` can + * be created. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   UserName parent = UserName.of("[USER]");
+   *   Section section = Section.newBuilder().build();
+   *   Section response = chatServiceClient.createSection(parent, section);
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the section is created. + *

Format: `users/{user}` + * @param section Required. The section to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Section createSection(UserName parent, Section section) { + CreateSectionRequest request = + CreateSectionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSection(section) + .build(); + return createSection(request); } - @Override - public boolean isShutdown() { - return stub.isShutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a section in Google Chat. Sections help users group conversations and customize the + * list of spaces displayed in Chat navigation panel. Only sections of type `CUSTOM_SECTION` can + * be created. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String parent = UserName.of("[USER]").toString();
+   *   Section section = Section.newBuilder().build();
+   *   Section response = chatServiceClient.createSection(parent, section);
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the section is created. + *

Format: `users/{user}` + * @param section Required. The section to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Section createSection(String parent, Section section) { + CreateSectionRequest request = + CreateSectionRequest.newBuilder().setParent(parent).setSection(section).build(); + return createSection(request); } - @Override - public boolean isTerminated() { - return stub.isTerminated(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a section in Google Chat. Sections help users group conversations and customize the + * list of spaces displayed in Chat navigation panel. Only sections of type `CUSTOM_SECTION` can + * be created. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   CreateSectionRequest request =
+   *       CreateSectionRequest.newBuilder()
+   *           .setParent(UserName.of("[USER]").toString())
+   *           .setSection(Section.newBuilder().build())
+   *           .build();
+   *   Section response = chatServiceClient.createSection(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 Section createSection(CreateSectionRequest request) { + return createSectionCallable().call(request); } - @Override - public void shutdownNow() { - stub.shutdownNow(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a section in Google Chat. Sections help users group conversations and customize the + * list of spaces displayed in Chat navigation panel. Only sections of type `CUSTOM_SECTION` can + * be created. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   CreateSectionRequest request =
+   *       CreateSectionRequest.newBuilder()
+   *           .setParent(UserName.of("[USER]").toString())
+   *           .setSection(Section.newBuilder().build())
+   *           .build();
+   *   ApiFuture
future = chatServiceClient.createSectionCallable().futureCall(request); + * // Do something. + * Section response = future.get(); + * } + * }
+ */ + public final UnaryCallable createSectionCallable() { + return stub.createSectionCallable(); } - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a section of type `CUSTOM_SECTION`. + * + *

If the section contains items, such as spaces, the items are moved to Google Chat's default + * sections and are not deleted. + * + *

For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   SectionName name = SectionName.of("[USER]", "[SECTION]");
+   *   chatServiceClient.deleteSection(name);
+   * }
+   * }
+ * + * @param name Required. The name of the section to delete. + *

Format: `users/{user}/sections/{section}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSection(SectionName name) { + DeleteSectionRequest request = + DeleteSectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteSection(request); } - public static class ListMessagesPagedResponse - extends AbstractPagedListResponse< - ListMessagesRequest, - ListMessagesResponse, - Message, - ListMessagesPage, - ListMessagesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListMessagesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListMessagesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListMessagesPagedResponse(ListMessagesPage page) { + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a section of type `CUSTOM_SECTION`. + * + *

If the section contains items, such as spaces, the items are moved to Google Chat's default + * sections and are not deleted. + * + *

For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String name = SectionName.of("[USER]", "[SECTION]").toString();
+   *   chatServiceClient.deleteSection(name);
+   * }
+   * }
+ * + * @param name Required. The name of the section to delete. + *

Format: `users/{user}/sections/{section}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSection(String name) { + DeleteSectionRequest request = DeleteSectionRequest.newBuilder().setName(name).build(); + deleteSection(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a section of type `CUSTOM_SECTION`. + * + *

If the section contains items, such as spaces, the items are moved to Google Chat's default + * sections and are not deleted. + * + *

For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   DeleteSectionRequest request =
+   *       DeleteSectionRequest.newBuilder()
+   *           .setName(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .build();
+   *   chatServiceClient.deleteSection(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 deleteSection(DeleteSectionRequest request) { + deleteSectionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a section of type `CUSTOM_SECTION`. + * + *

If the section contains items, such as spaces, the items are moved to Google Chat's default + * sections and are not deleted. + * + *

For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   DeleteSectionRequest request =
+   *       DeleteSectionRequest.newBuilder()
+   *           .setName(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .build();
+   *   ApiFuture future = chatServiceClient.deleteSectionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSectionCallable() { + return stub.deleteSectionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. For details, see + * [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   Section section = Section.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Section response = chatServiceClient.updateSection(section, updateMask);
+   * }
+   * }
+ * + * @param section Required. The section to update. + * @param updateMask Required. The mask to specify which fields to update. + *

Currently supported field paths: + *

- `display_name` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Section updateSection(Section section, FieldMask updateMask) { + UpdateSectionRequest request = + UpdateSectionRequest.newBuilder().setSection(section).setUpdateMask(updateMask).build(); + return updateSection(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. For details, see + * [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   UpdateSectionRequest request =
+   *       UpdateSectionRequest.newBuilder()
+   *           .setSection(Section.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Section response = chatServiceClient.updateSection(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 Section updateSection(UpdateSectionRequest request) { + return updateSectionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. For details, see + * [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   UpdateSectionRequest request =
+   *       UpdateSectionRequest.newBuilder()
+   *           .setSection(Section.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture
future = chatServiceClient.updateSectionCallable().futureCall(request); + * // Do something. + * Section response = future.get(); + * } + * }
+ */ + public final UnaryCallable updateSectionCallable() { + return stub.updateSectionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sections available to the Chat user. Sections help users group their conversations and + * customize the list of spaces displayed in Chat navigation panel. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   UserName parent = UserName.of("[USER]");
+   *   for (Section element : chatServiceClient.listSections(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which is the user resource name that owns this collection + * of sections. Only supports listing sections for the calling user. To refer to the calling + * user, set one of the following: + *

- The `me` alias. For example, `users/me`. + *

- Their Workspace email address. For example, `users/user{@literal @}example.com`. + *

- Their user id. For example, `users/123456789`. + *

Format: `users/{user}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSectionsPagedResponse listSections(UserName parent) { + ListSectionsRequest request = + ListSectionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSections(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sections available to the Chat user. Sections help users group their conversations and + * customize the list of spaces displayed in Chat navigation panel. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String parent = UserName.of("[USER]").toString();
+   *   for (Section element : chatServiceClient.listSections(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which is the user resource name that owns this collection + * of sections. Only supports listing sections for the calling user. To refer to the calling + * user, set one of the following: + *

- The `me` alias. For example, `users/me`. + *

- Their Workspace email address. For example, `users/user{@literal @}example.com`. + *

- Their user id. For example, `users/123456789`. + *

Format: `users/{user}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSectionsPagedResponse listSections(String parent) { + ListSectionsRequest request = ListSectionsRequest.newBuilder().setParent(parent).build(); + return listSections(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sections available to the Chat user. Sections help users group their conversations and + * customize the list of spaces displayed in Chat navigation panel. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListSectionsRequest request =
+   *       ListSectionsRequest.newBuilder()
+   *           .setParent(UserName.of("[USER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Section element : chatServiceClient.listSections(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 ListSectionsPagedResponse listSections(ListSectionsRequest request) { + return listSectionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sections available to the Chat user. Sections help users group their conversations and + * customize the list of spaces displayed in Chat navigation panel. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListSectionsRequest request =
+   *       ListSectionsRequest.newBuilder()
+   *           .setParent(UserName.of("[USER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture
future = chatServiceClient.listSectionsPagedCallable().futureCall(request); + * // Do something. + * for (Section element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
+ */ + public final UnaryCallable + listSectionsPagedCallable() { + return stub.listSectionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sections available to the Chat user. Sections help users group their conversations and + * customize the list of spaces displayed in Chat navigation panel. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListSectionsRequest request =
+   *       ListSectionsRequest.newBuilder()
+   *           .setParent(UserName.of("[USER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListSectionsResponse response = chatServiceClient.listSectionsCallable().call(request);
+   *     for (Section element : response.getSectionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSectionsCallable() { + return stub.listSectionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Changes the sort order of a section. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   PositionSectionRequest request =
+   *       PositionSectionRequest.newBuilder()
+   *           .setName(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .build();
+   *   PositionSectionResponse response = chatServiceClient.positionSection(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 PositionSectionResponse positionSection(PositionSectionRequest request) { + return positionSectionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Changes the sort order of a section. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   PositionSectionRequest request =
+   *       PositionSectionRequest.newBuilder()
+   *           .setName(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       chatServiceClient.positionSectionCallable().futureCall(request);
+   *   // Do something.
+   *   PositionSectionResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + positionSectionCallable() { + return stub.positionSectionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists items in a section. + * + *

Only spaces can be section items. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   SectionName parent = SectionName.of("[USER]", "[SECTION]");
+   *   for (SectionItem element : chatServiceClient.listSectionItems(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which is the section resource name that owns this + * collection of section items. Only supports listing section items for the calling user. + *

When you're filtering by space, use the wildcard `-` to search across all sections. For + * example, `users/{user}/sections/-`. + *

Format: `users/{user}/sections/{section}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSectionItemsPagedResponse listSectionItems(SectionName parent) { + ListSectionItemsRequest request = + ListSectionItemsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSectionItems(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists items in a section. + * + *

Only spaces can be section items. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String parent = SectionName.of("[USER]", "[SECTION]").toString();
+   *   for (SectionItem element : chatServiceClient.listSectionItems(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which is the section resource name that owns this + * collection of section items. Only supports listing section items for the calling user. + *

When you're filtering by space, use the wildcard `-` to search across all sections. For + * example, `users/{user}/sections/-`. + *

Format: `users/{user}/sections/{section}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSectionItemsPagedResponse listSectionItems(String parent) { + ListSectionItemsRequest request = + ListSectionItemsRequest.newBuilder().setParent(parent).build(); + return listSectionItems(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists items in a section. + * + *

Only spaces can be section items. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListSectionItemsRequest request =
+   *       ListSectionItemsRequest.newBuilder()
+   *           .setParent(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (SectionItem element : chatServiceClient.listSectionItems(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 ListSectionItemsPagedResponse listSectionItems(ListSectionItemsRequest request) { + return listSectionItemsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists items in a section. + * + *

Only spaces can be section items. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListSectionItemsRequest request =
+   *       ListSectionItemsRequest.newBuilder()
+   *           .setParent(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       chatServiceClient.listSectionItemsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SectionItem element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSectionItemsPagedCallable() { + return stub.listSectionItemsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists items in a section. + * + *

Only spaces can be section items. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   ListSectionItemsRequest request =
+   *       ListSectionItemsRequest.newBuilder()
+   *           .setParent(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListSectionItemsResponse response =
+   *         chatServiceClient.listSectionItemsCallable().call(request);
+   *     for (SectionItem element : response.getSectionItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSectionItemsCallable() { + return stub.listSectionItemsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Moves an item from one section to another. For example, if a section contains spaces, this + * method can be used to move a space to a different section. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]");
+   *   SectionName targetSection = SectionName.of("[USER]", "[SECTION]");
+   *   MoveSectionItemResponse response = chatServiceClient.moveSectionItem(name, targetSection);
+   * }
+   * }
+ * + * @param name Required. The resource name of the section item to move. + *

Format: `users/{user}/sections/{section}/items/{item}` + * @param targetSection Required. The resource name of the section to move the section item to. + *

Format: `users/{user}/sections/{section}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MoveSectionItemResponse moveSectionItem( + SectionItemName name, SectionName targetSection) { + MoveSectionItemRequest request = + MoveSectionItemRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setTargetSection(targetSection == null ? null : targetSection.toString()) + .build(); + return moveSectionItem(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Moves an item from one section to another. For example, if a section contains spaces, this + * method can be used to move a space to a different section. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]");
+   *   String targetSection = SectionName.of("[USER]", "[SECTION]").toString();
+   *   MoveSectionItemResponse response = chatServiceClient.moveSectionItem(name, targetSection);
+   * }
+   * }
+ * + * @param name Required. The resource name of the section item to move. + *

Format: `users/{user}/sections/{section}/items/{item}` + * @param targetSection Required. The resource name of the section to move the section item to. + *

Format: `users/{user}/sections/{section}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MoveSectionItemResponse moveSectionItem(SectionItemName name, String targetSection) { + MoveSectionItemRequest request = + MoveSectionItemRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setTargetSection(targetSection) + .build(); + return moveSectionItem(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Moves an item from one section to another. For example, if a section contains spaces, this + * method can be used to move a space to a different section. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]").toString();
+   *   SectionName targetSection = SectionName.of("[USER]", "[SECTION]");
+   *   MoveSectionItemResponse response = chatServiceClient.moveSectionItem(name, targetSection);
+   * }
+   * }
+ * + * @param name Required. The resource name of the section item to move. + *

Format: `users/{user}/sections/{section}/items/{item}` + * @param targetSection Required. The resource name of the section to move the section item to. + *

Format: `users/{user}/sections/{section}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MoveSectionItemResponse moveSectionItem(String name, SectionName targetSection) { + MoveSectionItemRequest request = + MoveSectionItemRequest.newBuilder() + .setName(name) + .setTargetSection(targetSection == null ? null : targetSection.toString()) + .build(); + return moveSectionItem(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Moves an item from one section to another. For example, if a section contains spaces, this + * method can be used to move a space to a different section. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   String name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]").toString();
+   *   String targetSection = SectionName.of("[USER]", "[SECTION]").toString();
+   *   MoveSectionItemResponse response = chatServiceClient.moveSectionItem(name, targetSection);
+   * }
+   * }
+ * + * @param name Required. The resource name of the section item to move. + *

Format: `users/{user}/sections/{section}/items/{item}` + * @param targetSection Required. The resource name of the section to move the section item to. + *

Format: `users/{user}/sections/{section}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MoveSectionItemResponse moveSectionItem(String name, String targetSection) { + MoveSectionItemRequest request = + MoveSectionItemRequest.newBuilder().setName(name).setTargetSection(targetSection).build(); + return moveSectionItem(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Moves an item from one section to another. For example, if a section contains spaces, this + * method can be used to move a space to a different section. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   MoveSectionItemRequest request =
+   *       MoveSectionItemRequest.newBuilder()
+   *           .setName(SectionItemName.of("[USER]", "[SECTION]", "[ITEM]").toString())
+   *           .setTargetSection(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .build();
+   *   MoveSectionItemResponse response = chatServiceClient.moveSectionItem(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 MoveSectionItemResponse moveSectionItem(MoveSectionItemRequest request) { + return moveSectionItemCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Moves an item from one section to another. For example, if a section contains spaces, this + * method can be used to move a space to a different section. For details, see [Create and + * organize sections in Google Chat](https://support.google.com/chat/answer/16059854). + * + *

Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * + *

- `https://www.googleapis.com/auth/chat.users.sections` + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+   *   MoveSectionItemRequest request =
+   *       MoveSectionItemRequest.newBuilder()
+   *           .setName(SectionItemName.of("[USER]", "[SECTION]", "[ITEM]").toString())
+   *           .setTargetSection(SectionName.of("[USER]", "[SECTION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       chatServiceClient.moveSectionItemCallable().futureCall(request);
+   *   // Do something.
+   *   MoveSectionItemResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + moveSectionItemCallable() { + return stub.moveSectionItemCallable(); + } + + @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 ListMessagesPagedResponse + extends AbstractPagedListResponse< + ListMessagesRequest, + ListMessagesResponse, + Message, + ListMessagesPage, + ListMessagesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMessagesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMessagesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMessagesPagedResponse(ListMessagesPage page) { super(page, ListMessagesFixedSizeCollection.createEmptyCollection()); } } @@ -8247,4 +9603,156 @@ protected ListSpaceEventsFixedSizeCollection createCollection( return new ListSpaceEventsFixedSizeCollection(pages, collectionSize); } } + + public static class ListSectionsPagedResponse + extends AbstractPagedListResponse< + ListSectionsRequest, + ListSectionsResponse, + Section, + ListSectionsPage, + ListSectionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSectionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSectionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSectionsPagedResponse(ListSectionsPage page) { + super(page, ListSectionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSectionsPage + extends AbstractPage { + + private ListSectionsPage( + PageContext context, + ListSectionsResponse response) { + super(context, response); + } + + private static ListSectionsPage createEmptyPage() { + return new ListSectionsPage(null, null); + } + + @Override + protected ListSectionsPage createPage( + PageContext context, + ListSectionsResponse response) { + return new ListSectionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSectionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSectionsRequest, + ListSectionsResponse, + Section, + ListSectionsPage, + ListSectionsFixedSizeCollection> { + + private ListSectionsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSectionsFixedSizeCollection createEmptyCollection() { + return new ListSectionsFixedSizeCollection(null, 0); + } + + @Override + protected ListSectionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSectionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSectionItemsPagedResponse + extends AbstractPagedListResponse< + ListSectionItemsRequest, + ListSectionItemsResponse, + SectionItem, + ListSectionItemsPage, + ListSectionItemsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSectionItemsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSectionItemsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSectionItemsPagedResponse(ListSectionItemsPage page) { + super(page, ListSectionItemsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSectionItemsPage + extends AbstractPage< + ListSectionItemsRequest, ListSectionItemsResponse, SectionItem, ListSectionItemsPage> { + + private ListSectionItemsPage( + PageContext context, + ListSectionItemsResponse response) { + super(context, response); + } + + private static ListSectionItemsPage createEmptyPage() { + return new ListSectionItemsPage(null, null); + } + + @Override + protected ListSectionItemsPage createPage( + PageContext context, + ListSectionItemsResponse response) { + return new ListSectionItemsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSectionItemsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSectionItemsRequest, + ListSectionItemsResponse, + SectionItem, + ListSectionItemsPage, + ListSectionItemsFixedSizeCollection> { + + private ListSectionItemsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSectionItemsFixedSizeCollection createEmptyCollection() { + return new ListSectionItemsFixedSizeCollection(null, 0); + } + + @Override + protected ListSectionItemsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSectionItemsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceSettings.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceSettings.java index 4cb84f4dcf65..d0f288e2fc7e 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceSettings.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceSettings.java @@ -20,6 +20,8 @@ import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpaceEventsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpacesPagedResponse; import static com.google.chat.v1.ChatServiceClient.SearchSpacesPagedResponse; @@ -285,6 +287,46 @@ public UnaryCallSettings getSpaceEventSettings return ((ChatServiceStubSettings) getStubSettings()).updateSpaceNotificationSettingSettings(); } + /** Returns the object with the settings used for calls to createSection. */ + public UnaryCallSettings createSectionSettings() { + return ((ChatServiceStubSettings) getStubSettings()).createSectionSettings(); + } + + /** Returns the object with the settings used for calls to deleteSection. */ + public UnaryCallSettings deleteSectionSettings() { + return ((ChatServiceStubSettings) getStubSettings()).deleteSectionSettings(); + } + + /** Returns the object with the settings used for calls to updateSection. */ + public UnaryCallSettings updateSectionSettings() { + return ((ChatServiceStubSettings) getStubSettings()).updateSectionSettings(); + } + + /** Returns the object with the settings used for calls to listSections. */ + public PagedCallSettings + listSectionsSettings() { + return ((ChatServiceStubSettings) getStubSettings()).listSectionsSettings(); + } + + /** Returns the object with the settings used for calls to positionSection. */ + public UnaryCallSettings + positionSectionSettings() { + return ((ChatServiceStubSettings) getStubSettings()).positionSectionSettings(); + } + + /** Returns the object with the settings used for calls to listSectionItems. */ + public PagedCallSettings< + ListSectionItemsRequest, ListSectionItemsResponse, ListSectionItemsPagedResponse> + listSectionItemsSettings() { + return ((ChatServiceStubSettings) getStubSettings()).listSectionItemsSettings(); + } + + /** Returns the object with the settings used for calls to moveSectionItem. */ + public UnaryCallSettings + moveSectionItemSettings() { + return ((ChatServiceStubSettings) getStubSettings()).moveSectionItemSettings(); + } + public static final ChatServiceSettings create(ChatServiceStubSettings stub) throws IOException { return new ChatServiceSettings.Builder(stub.toBuilder()).build(); } @@ -596,6 +638,47 @@ public UnaryCallSettings.Builder getSpaceEvent return getStubSettingsBuilder().updateSpaceNotificationSettingSettings(); } + /** Returns the builder for the settings used for calls to createSection. */ + public UnaryCallSettings.Builder createSectionSettings() { + return getStubSettingsBuilder().createSectionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSection. */ + public UnaryCallSettings.Builder deleteSectionSettings() { + return getStubSettingsBuilder().deleteSectionSettings(); + } + + /** Returns the builder for the settings used for calls to updateSection. */ + public UnaryCallSettings.Builder updateSectionSettings() { + return getStubSettingsBuilder().updateSectionSettings(); + } + + /** Returns the builder for the settings used for calls to listSections. */ + public PagedCallSettings.Builder< + ListSectionsRequest, ListSectionsResponse, ListSectionsPagedResponse> + listSectionsSettings() { + return getStubSettingsBuilder().listSectionsSettings(); + } + + /** Returns the builder for the settings used for calls to positionSection. */ + public UnaryCallSettings.Builder + positionSectionSettings() { + return getStubSettingsBuilder().positionSectionSettings(); + } + + /** Returns the builder for the settings used for calls to listSectionItems. */ + public PagedCallSettings.Builder< + ListSectionItemsRequest, ListSectionItemsResponse, ListSectionItemsPagedResponse> + listSectionItemsSettings() { + return getStubSettingsBuilder().listSectionItemsSettings(); + } + + /** Returns the builder for the settings used for calls to moveSectionItem. */ + public UnaryCallSettings.Builder + moveSectionItemSettings() { + return getStubSettingsBuilder().moveSectionItemSettings(); + } + @Override public ChatServiceSettings build() throws IOException { return new ChatServiceSettings(this); diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/gapic_metadata.json b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/gapic_metadata.json index 32fa1905d001..ccdd152e2645 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/gapic_metadata.json +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/gapic_metadata.json @@ -25,6 +25,9 @@ "CreateReaction": { "methods": ["createReaction", "createReaction", "createReaction", "createReactionCallable"] }, + "CreateSection": { + "methods": ["createSection", "createSection", "createSection", "createSectionCallable"] + }, "CreateSpace": { "methods": ["createSpace", "createSpace", "createSpaceCallable"] }, @@ -40,6 +43,9 @@ "DeleteReaction": { "methods": ["deleteReaction", "deleteReaction", "deleteReaction", "deleteReactionCallable"] }, + "DeleteSection": { + "methods": ["deleteSection", "deleteSection", "deleteSection", "deleteSectionCallable"] + }, "DeleteSpace": { "methods": ["deleteSpace", "deleteSpace", "deleteSpace", "deleteSpaceCallable"] }, @@ -85,12 +91,24 @@ "ListReactions": { "methods": ["listReactions", "listReactions", "listReactions", "listReactionsPagedCallable", "listReactionsCallable"] }, + "ListSectionItems": { + "methods": ["listSectionItems", "listSectionItems", "listSectionItems", "listSectionItemsPagedCallable", "listSectionItemsCallable"] + }, + "ListSections": { + "methods": ["listSections", "listSections", "listSections", "listSectionsPagedCallable", "listSectionsCallable"] + }, "ListSpaceEvents": { "methods": ["listSpaceEvents", "listSpaceEvents", "listSpaceEvents", "listSpaceEventsPagedCallable", "listSpaceEventsCallable"] }, "ListSpaces": { "methods": ["listSpaces", "listSpaces", "listSpacesPagedCallable", "listSpacesCallable"] }, + "MoveSectionItem": { + "methods": ["moveSectionItem", "moveSectionItem", "moveSectionItem", "moveSectionItem", "moveSectionItem", "moveSectionItemCallable"] + }, + "PositionSection": { + "methods": ["positionSection", "positionSectionCallable"] + }, "SearchSpaces": { "methods": ["searchSpaces", "searchSpaces", "searchSpacesPagedCallable", "searchSpacesCallable"] }, @@ -103,6 +121,9 @@ "UpdateMessage": { "methods": ["updateMessage", "updateMessage", "updateMessageCallable"] }, + "UpdateSection": { + "methods": ["updateSection", "updateSection", "updateSectionCallable"] + }, "UpdateSpace": { "methods": ["updateSpace", "updateSpace", "updateSpaceCallable"] }, diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStub.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStub.java index 999448b3adae..bf882802d428 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStub.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStub.java @@ -20,6 +20,8 @@ import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpaceEventsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpacesPagedResponse; import static com.google.chat.v1.ChatServiceClient.SearchSpacesPagedResponse; @@ -33,12 +35,14 @@ import com.google.chat.v1.CreateMembershipRequest; import com.google.chat.v1.CreateMessageRequest; import com.google.chat.v1.CreateReactionRequest; +import com.google.chat.v1.CreateSectionRequest; import com.google.chat.v1.CreateSpaceRequest; import com.google.chat.v1.CustomEmoji; import com.google.chat.v1.DeleteCustomEmojiRequest; import com.google.chat.v1.DeleteMembershipRequest; import com.google.chat.v1.DeleteMessageRequest; import com.google.chat.v1.DeleteReactionRequest; +import com.google.chat.v1.DeleteSectionRequest; import com.google.chat.v1.DeleteSpaceRequest; import com.google.chat.v1.FindDirectMessageRequest; import com.google.chat.v1.GetAttachmentRequest; @@ -58,15 +62,24 @@ import com.google.chat.v1.ListMessagesResponse; import com.google.chat.v1.ListReactionsRequest; import com.google.chat.v1.ListReactionsResponse; +import com.google.chat.v1.ListSectionItemsRequest; +import com.google.chat.v1.ListSectionItemsResponse; +import com.google.chat.v1.ListSectionsRequest; +import com.google.chat.v1.ListSectionsResponse; import com.google.chat.v1.ListSpaceEventsRequest; import com.google.chat.v1.ListSpaceEventsResponse; import com.google.chat.v1.ListSpacesRequest; import com.google.chat.v1.ListSpacesResponse; import com.google.chat.v1.Membership; import com.google.chat.v1.Message; +import com.google.chat.v1.MoveSectionItemRequest; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.PositionSectionRequest; +import com.google.chat.v1.PositionSectionResponse; import com.google.chat.v1.Reaction; import com.google.chat.v1.SearchSpacesRequest; import com.google.chat.v1.SearchSpacesResponse; +import com.google.chat.v1.Section; import com.google.chat.v1.SetUpSpaceRequest; import com.google.chat.v1.Space; import com.google.chat.v1.SpaceEvent; @@ -75,6 +88,7 @@ import com.google.chat.v1.ThreadReadState; import com.google.chat.v1.UpdateMembershipRequest; import com.google.chat.v1.UpdateMessageRequest; +import com.google.chat.v1.UpdateSectionRequest; import com.google.chat.v1.UpdateSpaceNotificationSettingRequest; import com.google.chat.v1.UpdateSpaceReadStateRequest; import com.google.chat.v1.UpdateSpaceRequest; @@ -271,6 +285,44 @@ public UnaryCallable listSpaceE "Not implemented: updateSpaceNotificationSettingCallable()"); } + public UnaryCallable createSectionCallable() { + throw new UnsupportedOperationException("Not implemented: createSectionCallable()"); + } + + public UnaryCallable deleteSectionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSectionCallable()"); + } + + public UnaryCallable updateSectionCallable() { + throw new UnsupportedOperationException("Not implemented: updateSectionCallable()"); + } + + public UnaryCallable listSectionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSectionsPagedCallable()"); + } + + public UnaryCallable listSectionsCallable() { + throw new UnsupportedOperationException("Not implemented: listSectionsCallable()"); + } + + public UnaryCallable positionSectionCallable() { + throw new UnsupportedOperationException("Not implemented: positionSectionCallable()"); + } + + public UnaryCallable + listSectionItemsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSectionItemsPagedCallable()"); + } + + public UnaryCallable + listSectionItemsCallable() { + throw new UnsupportedOperationException("Not implemented: listSectionItemsCallable()"); + } + + public UnaryCallable moveSectionItemCallable() { + throw new UnsupportedOperationException("Not implemented: moveSectionItemCallable()"); + } + @Override public abstract void close(); } diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStubSettings.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStubSettings.java index 555265d810e3..e230dff29482 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStubSettings.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/ChatServiceStubSettings.java @@ -20,6 +20,8 @@ import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpaceEventsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpacesPagedResponse; import static com.google.chat.v1.ChatServiceClient.SearchSpacesPagedResponse; @@ -58,12 +60,14 @@ import com.google.chat.v1.CreateMembershipRequest; import com.google.chat.v1.CreateMessageRequest; import com.google.chat.v1.CreateReactionRequest; +import com.google.chat.v1.CreateSectionRequest; import com.google.chat.v1.CreateSpaceRequest; import com.google.chat.v1.CustomEmoji; import com.google.chat.v1.DeleteCustomEmojiRequest; import com.google.chat.v1.DeleteMembershipRequest; import com.google.chat.v1.DeleteMessageRequest; import com.google.chat.v1.DeleteReactionRequest; +import com.google.chat.v1.DeleteSectionRequest; import com.google.chat.v1.DeleteSpaceRequest; import com.google.chat.v1.FindDirectMessageRequest; import com.google.chat.v1.GetAttachmentRequest; @@ -83,15 +87,25 @@ import com.google.chat.v1.ListMessagesResponse; import com.google.chat.v1.ListReactionsRequest; import com.google.chat.v1.ListReactionsResponse; +import com.google.chat.v1.ListSectionItemsRequest; +import com.google.chat.v1.ListSectionItemsResponse; +import com.google.chat.v1.ListSectionsRequest; +import com.google.chat.v1.ListSectionsResponse; import com.google.chat.v1.ListSpaceEventsRequest; import com.google.chat.v1.ListSpaceEventsResponse; import com.google.chat.v1.ListSpacesRequest; import com.google.chat.v1.ListSpacesResponse; import com.google.chat.v1.Membership; import com.google.chat.v1.Message; +import com.google.chat.v1.MoveSectionItemRequest; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.PositionSectionRequest; +import com.google.chat.v1.PositionSectionResponse; import com.google.chat.v1.Reaction; import com.google.chat.v1.SearchSpacesRequest; import com.google.chat.v1.SearchSpacesResponse; +import com.google.chat.v1.Section; +import com.google.chat.v1.SectionItem; import com.google.chat.v1.SetUpSpaceRequest; import com.google.chat.v1.Space; import com.google.chat.v1.SpaceEvent; @@ -100,6 +114,7 @@ import com.google.chat.v1.ThreadReadState; import com.google.chat.v1.UpdateMembershipRequest; import com.google.chat.v1.UpdateMessageRequest; +import com.google.chat.v1.UpdateSectionRequest; import com.google.chat.v1.UpdateSpaceNotificationSettingRequest; import com.google.chat.v1.UpdateSpaceReadStateRequest; import com.google.chat.v1.UpdateSpaceRequest; @@ -178,9 +193,11 @@ public class ChatServiceStubSettings extends StubSettings updateSpaceNotificationSettingSettings; + private final UnaryCallSettings createSectionSettings; + private final UnaryCallSettings deleteSectionSettings; + private final UnaryCallSettings updateSectionSettings; + private final PagedCallSettings< + ListSectionsRequest, ListSectionsResponse, ListSectionsPagedResponse> + listSectionsSettings; + private final UnaryCallSettings + positionSectionSettings; + private final PagedCallSettings< + ListSectionItemsRequest, ListSectionItemsResponse, ListSectionItemsPagedResponse> + listSectionItemsSettings; + private final UnaryCallSettings + moveSectionItemSettings; private static final PagedListDescriptor LIST_MESSAGES_PAGE_STR_DESC = @@ -507,6 +539,78 @@ public Iterable extractResources(ListSpaceEventsResponse payload) { } }; + private static final PagedListDescriptor + LIST_SECTIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSectionsRequest injectToken(ListSectionsRequest payload, String token) { + return ListSectionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSectionsRequest injectPageSize(ListSectionsRequest payload, int pageSize) { + return ListSectionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSectionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSectionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable
extractResources(ListSectionsResponse payload) { + return payload.getSectionsList(); + } + }; + + private static final PagedListDescriptor< + ListSectionItemsRequest, ListSectionItemsResponse, SectionItem> + LIST_SECTION_ITEMS_PAGE_STR_DESC = + new PagedListDescriptor< + ListSectionItemsRequest, ListSectionItemsResponse, SectionItem>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSectionItemsRequest injectToken( + ListSectionItemsRequest payload, String token) { + return ListSectionItemsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSectionItemsRequest injectPageSize( + ListSectionItemsRequest payload, int pageSize) { + return ListSectionItemsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSectionItemsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSectionItemsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSectionItemsResponse payload) { + return payload.getSectionItemsList(); + } + }; + private static final PagedListResponseFactory< ListMessagesRequest, ListMessagesResponse, ListMessagesPagedResponse> LIST_MESSAGES_PAGE_STR_FACT = @@ -628,6 +732,42 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListSectionsRequest, ListSectionsResponse, ListSectionsPagedResponse> + LIST_SECTIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSectionsRequest, ListSectionsResponse, ListSectionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSectionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SECTIONS_PAGE_STR_DESC, request, context); + return ListSectionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSectionItemsRequest, ListSectionItemsResponse, ListSectionItemsPagedResponse> + LIST_SECTION_ITEMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSectionItemsRequest, ListSectionItemsResponse, ListSectionItemsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSectionItemsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_SECTION_ITEMS_PAGE_STR_DESC, request, context); + return ListSectionItemsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to createMessage. */ public UnaryCallSettings createMessageSettings() { return createMessageSettings; @@ -819,6 +959,46 @@ public UnaryCallSettings getSpaceEventSettings return updateSpaceNotificationSettingSettings; } + /** Returns the object with the settings used for calls to createSection. */ + public UnaryCallSettings createSectionSettings() { + return createSectionSettings; + } + + /** Returns the object with the settings used for calls to deleteSection. */ + public UnaryCallSettings deleteSectionSettings() { + return deleteSectionSettings; + } + + /** Returns the object with the settings used for calls to updateSection. */ + public UnaryCallSettings updateSectionSettings() { + return updateSectionSettings; + } + + /** Returns the object with the settings used for calls to listSections. */ + public PagedCallSettings + listSectionsSettings() { + return listSectionsSettings; + } + + /** Returns the object with the settings used for calls to positionSection. */ + public UnaryCallSettings + positionSectionSettings() { + return positionSectionSettings; + } + + /** Returns the object with the settings used for calls to listSectionItems. */ + public PagedCallSettings< + ListSectionItemsRequest, ListSectionItemsResponse, ListSectionItemsPagedResponse> + listSectionItemsSettings() { + return listSectionItemsSettings; + } + + /** Returns the object with the settings used for calls to moveSectionItem. */ + public UnaryCallSettings + moveSectionItemSettings() { + return moveSectionItemSettings; + } + public ChatServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -967,6 +1147,13 @@ protected ChatServiceStubSettings(Builder settingsBuilder) throws IOException { settingsBuilder.getSpaceNotificationSettingSettings().build(); updateSpaceNotificationSettingSettings = settingsBuilder.updateSpaceNotificationSettingSettings().build(); + createSectionSettings = settingsBuilder.createSectionSettings().build(); + deleteSectionSettings = settingsBuilder.deleteSectionSettings().build(); + updateSectionSettings = settingsBuilder.updateSectionSettings().build(); + listSectionsSettings = settingsBuilder.listSectionsSettings().build(); + positionSectionSettings = settingsBuilder.positionSectionSettings().build(); + listSectionItemsSettings = settingsBuilder.listSectionItemsSettings().build(); + moveSectionItemSettings = settingsBuilder.moveSectionItemSettings().build(); } @Override @@ -1046,6 +1233,19 @@ public static class Builder extends StubSettings.Builder updateSpaceNotificationSettingSettings; + private final UnaryCallSettings.Builder createSectionSettings; + private final UnaryCallSettings.Builder deleteSectionSettings; + private final UnaryCallSettings.Builder updateSectionSettings; + private final PagedCallSettings.Builder< + ListSectionsRequest, ListSectionsResponse, ListSectionsPagedResponse> + listSectionsSettings; + private final UnaryCallSettings.Builder + positionSectionSettings; + private final PagedCallSettings.Builder< + ListSectionItemsRequest, ListSectionItemsResponse, ListSectionItemsPagedResponse> + listSectionItemsSettings; + private final UnaryCallSettings.Builder + moveSectionItemSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -1119,6 +1319,13 @@ protected Builder(ClientContext clientContext) { listSpaceEventsSettings = PagedCallSettings.newBuilder(LIST_SPACE_EVENTS_PAGE_STR_FACT); getSpaceNotificationSettingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateSpaceNotificationSettingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSectionsSettings = PagedCallSettings.newBuilder(LIST_SECTIONS_PAGE_STR_FACT); + positionSectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSectionItemsSettings = PagedCallSettings.newBuilder(LIST_SECTION_ITEMS_PAGE_STR_FACT); + moveSectionItemSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -1156,7 +1363,14 @@ protected Builder(ClientContext clientContext) { getSpaceEventSettings, listSpaceEventsSettings, getSpaceNotificationSettingSettings, - updateSpaceNotificationSettingSettings); + updateSpaceNotificationSettingSettings, + createSectionSettings, + deleteSectionSettings, + updateSectionSettings, + listSectionsSettings, + positionSectionSettings, + listSectionItemsSettings, + moveSectionItemSettings); initDefaults(this); } @@ -1200,6 +1414,13 @@ protected Builder(ChatServiceStubSettings settings) { settings.getSpaceNotificationSettingSettings.toBuilder(); updateSpaceNotificationSettingSettings = settings.updateSpaceNotificationSettingSettings.toBuilder(); + createSectionSettings = settings.createSectionSettings.toBuilder(); + deleteSectionSettings = settings.deleteSectionSettings.toBuilder(); + updateSectionSettings = settings.updateSectionSettings.toBuilder(); + listSectionsSettings = settings.listSectionsSettings.toBuilder(); + positionSectionSettings = settings.positionSectionSettings.toBuilder(); + listSectionItemsSettings = settings.listSectionItemsSettings.toBuilder(); + moveSectionItemSettings = settings.moveSectionItemSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -1237,7 +1458,14 @@ protected Builder(ChatServiceStubSettings settings) { getSpaceEventSettings, listSpaceEventsSettings, getSpaceNotificationSettingSettings, - updateSpaceNotificationSettingSettings); + updateSpaceNotificationSettingSettings, + createSectionSettings, + deleteSectionSettings, + updateSectionSettings, + listSectionsSettings, + positionSectionSettings, + listSectionItemsSettings, + moveSectionItemSettings); } private static Builder createDefault() { @@ -1440,6 +1668,41 @@ 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 + .createSectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteSectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateSectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSectionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .positionSectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSectionItemsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .moveSectionItemSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + return builder; } @@ -1658,6 +1921,47 @@ public UnaryCallSettings.Builder getSpaceEvent return updateSpaceNotificationSettingSettings; } + /** Returns the builder for the settings used for calls to createSection. */ + public UnaryCallSettings.Builder createSectionSettings() { + return createSectionSettings; + } + + /** Returns the builder for the settings used for calls to deleteSection. */ + public UnaryCallSettings.Builder deleteSectionSettings() { + return deleteSectionSettings; + } + + /** Returns the builder for the settings used for calls to updateSection. */ + public UnaryCallSettings.Builder updateSectionSettings() { + return updateSectionSettings; + } + + /** Returns the builder for the settings used for calls to listSections. */ + public PagedCallSettings.Builder< + ListSectionsRequest, ListSectionsResponse, ListSectionsPagedResponse> + listSectionsSettings() { + return listSectionsSettings; + } + + /** Returns the builder for the settings used for calls to positionSection. */ + public UnaryCallSettings.Builder + positionSectionSettings() { + return positionSectionSettings; + } + + /** Returns the builder for the settings used for calls to listSectionItems. */ + public PagedCallSettings.Builder< + ListSectionItemsRequest, ListSectionItemsResponse, ListSectionItemsPagedResponse> + listSectionItemsSettings() { + return listSectionItemsSettings; + } + + /** Returns the builder for the settings used for calls to moveSectionItem. */ + public UnaryCallSettings.Builder + moveSectionItemSettings() { + return moveSectionItemSettings; + } + @Override public ChatServiceStubSettings build() throws IOException { return new ChatServiceStubSettings(this); diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/GrpcChatServiceStub.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/GrpcChatServiceStub.java index a301a86d37e9..79293686d5c3 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/GrpcChatServiceStub.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/GrpcChatServiceStub.java @@ -20,6 +20,8 @@ import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpaceEventsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpacesPagedResponse; import static com.google.chat.v1.ChatServiceClient.SearchSpacesPagedResponse; @@ -38,12 +40,14 @@ import com.google.chat.v1.CreateMembershipRequest; import com.google.chat.v1.CreateMessageRequest; import com.google.chat.v1.CreateReactionRequest; +import com.google.chat.v1.CreateSectionRequest; import com.google.chat.v1.CreateSpaceRequest; import com.google.chat.v1.CustomEmoji; import com.google.chat.v1.DeleteCustomEmojiRequest; import com.google.chat.v1.DeleteMembershipRequest; import com.google.chat.v1.DeleteMessageRequest; import com.google.chat.v1.DeleteReactionRequest; +import com.google.chat.v1.DeleteSectionRequest; import com.google.chat.v1.DeleteSpaceRequest; import com.google.chat.v1.FindDirectMessageRequest; import com.google.chat.v1.GetAttachmentRequest; @@ -63,15 +67,24 @@ import com.google.chat.v1.ListMessagesResponse; import com.google.chat.v1.ListReactionsRequest; import com.google.chat.v1.ListReactionsResponse; +import com.google.chat.v1.ListSectionItemsRequest; +import com.google.chat.v1.ListSectionItemsResponse; +import com.google.chat.v1.ListSectionsRequest; +import com.google.chat.v1.ListSectionsResponse; import com.google.chat.v1.ListSpaceEventsRequest; import com.google.chat.v1.ListSpaceEventsResponse; import com.google.chat.v1.ListSpacesRequest; import com.google.chat.v1.ListSpacesResponse; import com.google.chat.v1.Membership; import com.google.chat.v1.Message; +import com.google.chat.v1.MoveSectionItemRequest; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.PositionSectionRequest; +import com.google.chat.v1.PositionSectionResponse; import com.google.chat.v1.Reaction; import com.google.chat.v1.SearchSpacesRequest; import com.google.chat.v1.SearchSpacesResponse; +import com.google.chat.v1.Section; import com.google.chat.v1.SetUpSpaceRequest; import com.google.chat.v1.Space; import com.google.chat.v1.SpaceEvent; @@ -80,6 +93,7 @@ import com.google.chat.v1.ThreadReadState; import com.google.chat.v1.UpdateMembershipRequest; import com.google.chat.v1.UpdateMessageRequest; +import com.google.chat.v1.UpdateSectionRequest; import com.google.chat.v1.UpdateSpaceNotificationSettingRequest; import com.google.chat.v1.UpdateSpaceReadStateRequest; import com.google.chat.v1.UpdateSpaceRequest; @@ -483,6 +497,84 @@ public class GrpcChatServiceStub extends ChatServiceStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + createSectionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/CreateSection") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateSectionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Section.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor deleteSectionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/DeleteSection") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteSectionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateSectionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/UpdateSection") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSectionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Section.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listSectionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/ListSections") + .setRequestMarshaller(ProtoUtils.marshaller(ListSectionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSectionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + positionSectionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/PositionSection") + .setRequestMarshaller( + ProtoUtils.marshaller(PositionSectionRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PositionSectionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listSectionItemsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/ListSectionItems") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSectionItemsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSectionItemsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + moveSectionItemMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.chat.v1.ChatService/MoveSectionItem") + .setRequestMarshaller( + ProtoUtils.marshaller(MoveSectionItemRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(MoveSectionItemResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private final UnaryCallable createMessageCallable; private final UnaryCallable listMessagesCallable; private final UnaryCallable @@ -540,6 +632,20 @@ public class GrpcChatServiceStub extends ChatServiceStub { getSpaceNotificationSettingCallable; private final UnaryCallable updateSpaceNotificationSettingCallable; + private final UnaryCallable createSectionCallable; + private final UnaryCallable deleteSectionCallable; + private final UnaryCallable updateSectionCallable; + private final UnaryCallable listSectionsCallable; + private final UnaryCallable + listSectionsPagedCallable; + private final UnaryCallable + positionSectionCallable; + private final UnaryCallable + listSectionItemsCallable; + private final UnaryCallable + listSectionItemsPagedCallable; + private final UnaryCallable + moveSectionItemCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -929,6 +1035,85 @@ protected GrpcChatServiceStub( return builder.build(); }) .build(); + GrpcCallSettings createSectionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSectionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings deleteSectionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSectionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updateSectionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSectionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("section.name", String.valueOf(request.getSection().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSectionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSectionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + positionSectionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(positionSectionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listSectionItemsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSectionItemsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + moveSectionItemTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(moveSectionItemMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); this.createMessageCallable = callableFactory.createUnaryCallable( @@ -1074,6 +1259,33 @@ protected GrpcChatServiceStub( updateSpaceNotificationSettingTransportSettings, settings.updateSpaceNotificationSettingSettings(), clientContext); + this.createSectionCallable = + callableFactory.createUnaryCallable( + createSectionTransportSettings, settings.createSectionSettings(), clientContext); + this.deleteSectionCallable = + callableFactory.createUnaryCallable( + deleteSectionTransportSettings, settings.deleteSectionSettings(), clientContext); + this.updateSectionCallable = + callableFactory.createUnaryCallable( + updateSectionTransportSettings, settings.updateSectionSettings(), clientContext); + this.listSectionsCallable = + callableFactory.createUnaryCallable( + listSectionsTransportSettings, settings.listSectionsSettings(), clientContext); + this.listSectionsPagedCallable = + callableFactory.createPagedCallable( + listSectionsTransportSettings, settings.listSectionsSettings(), clientContext); + this.positionSectionCallable = + callableFactory.createUnaryCallable( + positionSectionTransportSettings, settings.positionSectionSettings(), clientContext); + this.listSectionItemsCallable = + callableFactory.createUnaryCallable( + listSectionItemsTransportSettings, settings.listSectionItemsSettings(), clientContext); + this.listSectionItemsPagedCallable = + callableFactory.createPagedCallable( + listSectionItemsTransportSettings, settings.listSectionItemsSettings(), clientContext); + this.moveSectionItemCallable = + callableFactory.createUnaryCallable( + moveSectionItemTransportSettings, settings.moveSectionItemSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -1302,6 +1514,53 @@ public UnaryCallable listSpaceE return updateSpaceNotificationSettingCallable; } + @Override + public UnaryCallable createSectionCallable() { + return createSectionCallable; + } + + @Override + public UnaryCallable deleteSectionCallable() { + return deleteSectionCallable; + } + + @Override + public UnaryCallable updateSectionCallable() { + return updateSectionCallable; + } + + @Override + public UnaryCallable listSectionsCallable() { + return listSectionsCallable; + } + + @Override + public UnaryCallable listSectionsPagedCallable() { + return listSectionsPagedCallable; + } + + @Override + public UnaryCallable positionSectionCallable() { + return positionSectionCallable; + } + + @Override + public UnaryCallable + listSectionItemsCallable() { + return listSectionItemsCallable; + } + + @Override + public UnaryCallable + listSectionItemsPagedCallable() { + return listSectionItemsPagedCallable; + } + + @Override + public UnaryCallable moveSectionItemCallable() { + return moveSectionItemCallable; + } + @Override public final void close() { try { diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/HttpJsonChatServiceStub.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/HttpJsonChatServiceStub.java index 09657a7cdd3c..860c48a928df 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/HttpJsonChatServiceStub.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/stub/HttpJsonChatServiceStub.java @@ -20,6 +20,8 @@ import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpaceEventsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpacesPagedResponse; import static com.google.chat.v1.ChatServiceClient.SearchSpacesPagedResponse; @@ -43,12 +45,14 @@ import com.google.chat.v1.CreateMembershipRequest; import com.google.chat.v1.CreateMessageRequest; import com.google.chat.v1.CreateReactionRequest; +import com.google.chat.v1.CreateSectionRequest; import com.google.chat.v1.CreateSpaceRequest; import com.google.chat.v1.CustomEmoji; import com.google.chat.v1.DeleteCustomEmojiRequest; import com.google.chat.v1.DeleteMembershipRequest; import com.google.chat.v1.DeleteMessageRequest; import com.google.chat.v1.DeleteReactionRequest; +import com.google.chat.v1.DeleteSectionRequest; import com.google.chat.v1.DeleteSpaceRequest; import com.google.chat.v1.FindDirectMessageRequest; import com.google.chat.v1.GetAttachmentRequest; @@ -68,15 +72,24 @@ import com.google.chat.v1.ListMessagesResponse; import com.google.chat.v1.ListReactionsRequest; import com.google.chat.v1.ListReactionsResponse; +import com.google.chat.v1.ListSectionItemsRequest; +import com.google.chat.v1.ListSectionItemsResponse; +import com.google.chat.v1.ListSectionsRequest; +import com.google.chat.v1.ListSectionsResponse; import com.google.chat.v1.ListSpaceEventsRequest; import com.google.chat.v1.ListSpaceEventsResponse; import com.google.chat.v1.ListSpacesRequest; import com.google.chat.v1.ListSpacesResponse; import com.google.chat.v1.Membership; import com.google.chat.v1.Message; +import com.google.chat.v1.MoveSectionItemRequest; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.PositionSectionRequest; +import com.google.chat.v1.PositionSectionResponse; import com.google.chat.v1.Reaction; import com.google.chat.v1.SearchSpacesRequest; import com.google.chat.v1.SearchSpacesResponse; +import com.google.chat.v1.Section; import com.google.chat.v1.SetUpSpaceRequest; import com.google.chat.v1.Space; import com.google.chat.v1.SpaceEvent; @@ -85,6 +98,7 @@ import com.google.chat.v1.ThreadReadState; import com.google.chat.v1.UpdateMembershipRequest; import com.google.chat.v1.UpdateMessageRequest; +import com.google.chat.v1.UpdateSectionRequest; import com.google.chat.v1.UpdateSpaceNotificationSettingRequest; import com.google.chat.v1.UpdateSpaceReadStateRequest; import com.google.chat.v1.UpdateSpaceRequest; @@ -1401,6 +1415,263 @@ public class HttpJsonChatServiceStub extends ChatServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + createSectionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/CreateSection") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=users/*}/sections", + 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("section", request.getSection(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.
newBuilder() + .setDefaultInstance(Section.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteSectionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/DeleteSection") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=users/*/sections/*}", + 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 + updateSectionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/UpdateSection") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{section.name=users/*/sections/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "section.name", request.getSection().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("section", request.getSection(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.
newBuilder() + .setDefaultInstance(Section.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSectionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/ListSections") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=users/*}/sections", + 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(ListSectionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + positionSectionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/PositionSection") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=users/*/sections/*}:position", + 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(PositionSectionResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSectionItemsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/ListSectionItems") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=users/*/sections/*}/items", + 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(ListSectionItemsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + moveSectionItemMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.chat.v1.ChatService/MoveSectionItem") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=users/*/sections/*/items/*}:move", + 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(MoveSectionItemResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable createMessageCallable; private final UnaryCallable listMessagesCallable; private final UnaryCallable @@ -1458,6 +1729,20 @@ public class HttpJsonChatServiceStub extends ChatServiceStub { getSpaceNotificationSettingCallable; private final UnaryCallable updateSpaceNotificationSettingCallable; + private final UnaryCallable createSectionCallable; + private final UnaryCallable deleteSectionCallable; + private final UnaryCallable updateSectionCallable; + private final UnaryCallable listSectionsCallable; + private final UnaryCallable + listSectionsPagedCallable; + private final UnaryCallable + positionSectionCallable; + private final UnaryCallable + listSectionItemsCallable; + private final UnaryCallable + listSectionItemsPagedCallable; + private final UnaryCallable + moveSectionItemCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -1885,6 +2170,92 @@ protected HttpJsonChatServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings createSectionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings deleteSectionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings updateSectionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("section.name", String.valueOf(request.getSection().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listSectionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSectionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + positionSectionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(positionSectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listSectionItemsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSectionItemsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + moveSectionItemTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(moveSectionItemMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); this.createMessageCallable = callableFactory.createUnaryCallable( @@ -2030,6 +2401,33 @@ protected HttpJsonChatServiceStub( updateSpaceNotificationSettingTransportSettings, settings.updateSpaceNotificationSettingSettings(), clientContext); + this.createSectionCallable = + callableFactory.createUnaryCallable( + createSectionTransportSettings, settings.createSectionSettings(), clientContext); + this.deleteSectionCallable = + callableFactory.createUnaryCallable( + deleteSectionTransportSettings, settings.deleteSectionSettings(), clientContext); + this.updateSectionCallable = + callableFactory.createUnaryCallable( + updateSectionTransportSettings, settings.updateSectionSettings(), clientContext); + this.listSectionsCallable = + callableFactory.createUnaryCallable( + listSectionsTransportSettings, settings.listSectionsSettings(), clientContext); + this.listSectionsPagedCallable = + callableFactory.createPagedCallable( + listSectionsTransportSettings, settings.listSectionsSettings(), clientContext); + this.positionSectionCallable = + callableFactory.createUnaryCallable( + positionSectionTransportSettings, settings.positionSectionSettings(), clientContext); + this.listSectionItemsCallable = + callableFactory.createUnaryCallable( + listSectionItemsTransportSettings, settings.listSectionItemsSettings(), clientContext); + this.listSectionItemsPagedCallable = + callableFactory.createPagedCallable( + listSectionItemsTransportSettings, settings.listSectionItemsSettings(), clientContext); + this.moveSectionItemCallable = + callableFactory.createUnaryCallable( + moveSectionItemTransportSettings, settings.moveSectionItemSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -2073,6 +2471,13 @@ public static List getMethodDescriptors() { methodDescriptors.add(listSpaceEventsMethodDescriptor); methodDescriptors.add(getSpaceNotificationSettingMethodDescriptor); methodDescriptors.add(updateSpaceNotificationSettingMethodDescriptor); + methodDescriptors.add(createSectionMethodDescriptor); + methodDescriptors.add(deleteSectionMethodDescriptor); + methodDescriptors.add(updateSectionMethodDescriptor); + methodDescriptors.add(listSectionsMethodDescriptor); + methodDescriptors.add(positionSectionMethodDescriptor); + methodDescriptors.add(listSectionItemsMethodDescriptor); + methodDescriptors.add(moveSectionItemMethodDescriptor); return methodDescriptors; } @@ -2295,6 +2700,53 @@ public UnaryCallable listSpaceE return updateSpaceNotificationSettingCallable; } + @Override + public UnaryCallable createSectionCallable() { + return createSectionCallable; + } + + @Override + public UnaryCallable deleteSectionCallable() { + return deleteSectionCallable; + } + + @Override + public UnaryCallable updateSectionCallable() { + return updateSectionCallable; + } + + @Override + public UnaryCallable listSectionsCallable() { + return listSectionsCallable; + } + + @Override + public UnaryCallable listSectionsPagedCallable() { + return listSectionsPagedCallable; + } + + @Override + public UnaryCallable positionSectionCallable() { + return positionSectionCallable; + } + + @Override + public UnaryCallable + listSectionItemsCallable() { + return listSectionItemsCallable; + } + + @Override + public UnaryCallable + listSectionItemsPagedCallable() { + return listSectionItemsPagedCallable; + } + + @Override + public UnaryCallable moveSectionItemCallable() { + return moveSectionItemCallable; + } + @Override public final void close() { try { diff --git a/java-chat/google-cloud-chat/src/main/resources/META-INF/native-image/com.google.chat.v1/reflect-config.json b/java-chat/google-cloud-chat/src/main/resources/META-INF/native-image/com.google.chat.v1/reflect-config.json index 2557ebdab123..e15da918c968 100644 --- a/java-chat/google-cloud-chat/src/main/resources/META-INF/native-image/com.google.chat.v1/reflect-config.json +++ b/java-chat/google-cloud-chat/src/main/resources/META-INF/native-image/com.google.chat.v1/reflect-config.json @@ -1961,6 +1961,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.CreateSectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.CreateSectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.CreateSpaceRequest", "queryAllDeclaredConstructors": true, @@ -2105,6 +2123,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.DeleteSectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.DeleteSectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.DeleteSpaceRequest", "queryAllDeclaredConstructors": true, @@ -2627,6 +2663,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.ListSectionItemsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListSectionItemsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListSectionItemsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListSectionItemsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListSectionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListSectionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListSectionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.ListSectionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.ListSpaceEventsRequest", "queryAllDeclaredConstructors": true, @@ -3023,6 +3131,87 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.MoveSectionItemRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.MoveSectionItemRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.MoveSectionItemResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.MoveSectionItemResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.PositionSectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.PositionSectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.PositionSectionRequest$Position", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.PositionSectionResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.PositionSectionResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.QuotedMessageMetadata", "queryAllDeclaredConstructors": true, @@ -3221,6 +3410,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.Section", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.Section$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.Section$SectionType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.SectionItem", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.SectionItem$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.SetUpSpaceRequest", "queryAllDeclaredConstructors": true, @@ -3617,6 +3851,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.chat.v1.UpdateSectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.chat.v1.UpdateSectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.chat.v1.UpdateSpaceNotificationSettingRequest", "queryAllDeclaredConstructors": true, diff --git a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientHttpJsonTest.java b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientHttpJsonTest.java index 6228997d9390..9a326688ccc6 100644 --- a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientHttpJsonTest.java +++ b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientHttpJsonTest.java @@ -20,6 +20,8 @@ import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpaceEventsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpacesPagedResponse; import static com.google.chat.v1.ChatServiceClient.SearchSpacesPagedResponse; @@ -3024,4 +3026,670 @@ public void updateSpaceNotificationSettingExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void createSectionTest() throws Exception { + Section expectedResponse = + Section.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .setDisplayName("displayName1714148973") + .setSortOrder(-374296211) + .build(); + mockService.addResponse(expectedResponse); + + UserName parent = UserName.of("[USER]"); + Section section = Section.newBuilder().build(); + + Section actualResponse = client.createSection(parent, section); + 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 createSectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserName parent = UserName.of("[USER]"); + Section section = Section.newBuilder().build(); + client.createSection(parent, section); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSectionTest2() throws Exception { + Section expectedResponse = + Section.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .setDisplayName("displayName1714148973") + .setSortOrder(-374296211) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "users/user-1015"; + Section section = Section.newBuilder().build(); + + Section actualResponse = client.createSection(parent, section); + 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 createSectionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "users/user-1015"; + Section section = Section.newBuilder().build(); + client.createSection(parent, section); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSectionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + SectionName name = SectionName.of("[USER]", "[SECTION]"); + + client.deleteSection(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 deleteSectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SectionName name = SectionName.of("[USER]", "[SECTION]"); + client.deleteSection(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSectionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "users/user-6096/sections/section-6096"; + + client.deleteSection(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 deleteSectionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "users/user-6096/sections/section-6096"; + client.deleteSection(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSectionTest() throws Exception { + Section expectedResponse = + Section.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .setDisplayName("displayName1714148973") + .setSortOrder(-374296211) + .build(); + mockService.addResponse(expectedResponse); + + Section section = + Section.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .setDisplayName("displayName1714148973") + .setSortOrder(-374296211) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Section actualResponse = client.updateSection(section, 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 updateSectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Section section = + Section.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .setDisplayName("displayName1714148973") + .setSortOrder(-374296211) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSection(section, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSectionsTest() throws Exception { + Section responsesElement = Section.newBuilder().build(); + ListSectionsResponse expectedResponse = + ListSectionsResponse.newBuilder() + .setNextPageToken("") + .addAllSections(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + UserName parent = UserName.of("[USER]"); + + ListSectionsPagedResponse pagedListResponse = client.listSections(parent); + + List
resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSectionsList().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 listSectionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserName parent = UserName.of("[USER]"); + client.listSections(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSectionsTest2() throws Exception { + Section responsesElement = Section.newBuilder().build(); + ListSectionsResponse expectedResponse = + ListSectionsResponse.newBuilder() + .setNextPageToken("") + .addAllSections(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "users/user-1015"; + + ListSectionsPagedResponse pagedListResponse = client.listSections(parent); + + List
resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSectionsList().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 listSectionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "users/user-1015"; + client.listSections(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void positionSectionTest() throws Exception { + PositionSectionResponse expectedResponse = + PositionSectionResponse.newBuilder().setSection(Section.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + PositionSectionRequest request = + PositionSectionRequest.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + + PositionSectionResponse actualResponse = client.positionSection(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 positionSectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PositionSectionRequest request = + PositionSectionRequest.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + client.positionSection(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSectionItemsTest() throws Exception { + SectionItem responsesElement = SectionItem.newBuilder().build(); + ListSectionItemsResponse expectedResponse = + ListSectionItemsResponse.newBuilder() + .setNextPageToken("") + .addAllSectionItems(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SectionName parent = SectionName.of("[USER]", "[SECTION]"); + + ListSectionItemsPagedResponse pagedListResponse = client.listSectionItems(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSectionItemsList().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 listSectionItemsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SectionName parent = SectionName.of("[USER]", "[SECTION]"); + client.listSectionItems(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSectionItemsTest2() throws Exception { + SectionItem responsesElement = SectionItem.newBuilder().build(); + ListSectionItemsResponse expectedResponse = + ListSectionItemsResponse.newBuilder() + .setNextPageToken("") + .addAllSectionItems(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "users/user-9889/sections/section-9889"; + + ListSectionItemsPagedResponse pagedListResponse = client.listSectionItems(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSectionItemsList().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 listSectionItemsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "users/user-9889/sections/section-9889"; + client.listSectionItems(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void moveSectionItemTest() throws Exception { + MoveSectionItemResponse expectedResponse = + MoveSectionItemResponse.newBuilder() + .setSectionItem(SectionItem.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + + MoveSectionItemResponse actualResponse = client.moveSectionItem(name, targetSection); + 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 moveSectionItemExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + client.moveSectionItem(name, targetSection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void moveSectionItemTest2() throws Exception { + MoveSectionItemResponse expectedResponse = + MoveSectionItemResponse.newBuilder() + .setSectionItem(SectionItem.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + String targetSection = "targetSection-20778988"; + + MoveSectionItemResponse actualResponse = client.moveSectionItem(name, targetSection); + 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 moveSectionItemExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + String targetSection = "targetSection-20778988"; + client.moveSectionItem(name, targetSection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void moveSectionItemTest3() throws Exception { + MoveSectionItemResponse expectedResponse = + MoveSectionItemResponse.newBuilder() + .setSectionItem(SectionItem.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "users/user-3436/sections/section-3436/items/item-3436"; + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + + MoveSectionItemResponse actualResponse = client.moveSectionItem(name, targetSection); + 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 moveSectionItemExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "users/user-3436/sections/section-3436/items/item-3436"; + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + client.moveSectionItem(name, targetSection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void moveSectionItemTest4() throws Exception { + MoveSectionItemResponse expectedResponse = + MoveSectionItemResponse.newBuilder() + .setSectionItem(SectionItem.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "users/user-3436/sections/section-3436/items/item-3436"; + String targetSection = "targetSection-20778988"; + + MoveSectionItemResponse actualResponse = client.moveSectionItem(name, targetSection); + 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 moveSectionItemExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "users/user-3436/sections/section-3436/items/item-3436"; + String targetSection = "targetSection-20778988"; + client.moveSectionItem(name, targetSection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientTest.java b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientTest.java index aba5067412e5..b6817f027887 100644 --- a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientTest.java +++ b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/ChatServiceClientTest.java @@ -20,6 +20,8 @@ import static com.google.chat.v1.ChatServiceClient.ListMembershipsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListMessagesPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListReactionsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionItemsPagedResponse; +import static com.google.chat.v1.ChatServiceClient.ListSectionsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpaceEventsPagedResponse; import static com.google.chat.v1.ChatServiceClient.ListSpacesPagedResponse; import static com.google.chat.v1.ChatServiceClient.SearchSpacesPagedResponse; @@ -2596,4 +2598,585 @@ public void updateSpaceNotificationSettingExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void createSectionTest() throws Exception { + Section expectedResponse = + Section.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .setDisplayName("displayName1714148973") + .setSortOrder(-374296211) + .build(); + mockChatService.addResponse(expectedResponse); + + UserName parent = UserName.of("[USER]"); + Section section = Section.newBuilder().build(); + + Section actualResponse = client.createSection(parent, section); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSectionRequest actualRequest = ((CreateSectionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(section, actualRequest.getSection()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + UserName parent = UserName.of("[USER]"); + Section section = Section.newBuilder().build(); + client.createSection(parent, section); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSectionTest2() throws Exception { + Section expectedResponse = + Section.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .setDisplayName("displayName1714148973") + .setSortOrder(-374296211) + .build(); + mockChatService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Section section = Section.newBuilder().build(); + + Section actualResponse = client.createSection(parent, section); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSectionRequest actualRequest = ((CreateSectionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(section, actualRequest.getSection()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSectionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String parent = "parent-995424086"; + Section section = Section.newBuilder().build(); + client.createSection(parent, section); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSectionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockChatService.addResponse(expectedResponse); + + SectionName name = SectionName.of("[USER]", "[SECTION]"); + + client.deleteSection(name); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSectionRequest actualRequest = ((DeleteSectionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + SectionName name = SectionName.of("[USER]", "[SECTION]"); + client.deleteSection(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSectionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockChatService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteSection(name); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSectionRequest actualRequest = ((DeleteSectionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSectionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String name = "name3373707"; + client.deleteSection(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSectionTest() throws Exception { + Section expectedResponse = + Section.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .setDisplayName("displayName1714148973") + .setSortOrder(-374296211) + .build(); + mockChatService.addResponse(expectedResponse); + + Section section = Section.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Section actualResponse = client.updateSection(section, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSectionRequest actualRequest = ((UpdateSectionRequest) actualRequests.get(0)); + + Assert.assertEquals(section, actualRequest.getSection()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + Section section = Section.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSection(section, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSectionsTest() throws Exception { + Section responsesElement = Section.newBuilder().build(); + ListSectionsResponse expectedResponse = + ListSectionsResponse.newBuilder() + .setNextPageToken("") + .addAllSections(Arrays.asList(responsesElement)) + .build(); + mockChatService.addResponse(expectedResponse); + + UserName parent = UserName.of("[USER]"); + + ListSectionsPagedResponse pagedListResponse = client.listSections(parent); + + List
resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSectionsList().get(0), resources.get(0)); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSectionsRequest actualRequest = ((ListSectionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSectionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + UserName parent = UserName.of("[USER]"); + client.listSections(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSectionsTest2() throws Exception { + Section responsesElement = Section.newBuilder().build(); + ListSectionsResponse expectedResponse = + ListSectionsResponse.newBuilder() + .setNextPageToken("") + .addAllSections(Arrays.asList(responsesElement)) + .build(); + mockChatService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSectionsPagedResponse pagedListResponse = client.listSections(parent); + + List
resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSectionsList().get(0), resources.get(0)); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSectionsRequest actualRequest = ((ListSectionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSectionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSections(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void positionSectionTest() throws Exception { + PositionSectionResponse expectedResponse = + PositionSectionResponse.newBuilder().setSection(Section.newBuilder().build()).build(); + mockChatService.addResponse(expectedResponse); + + PositionSectionRequest request = + PositionSectionRequest.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + + PositionSectionResponse actualResponse = client.positionSection(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PositionSectionRequest actualRequest = ((PositionSectionRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getSortOrder(), actualRequest.getSortOrder()); + Assert.assertEquals(request.getRelativePosition(), actualRequest.getRelativePosition()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void positionSectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + PositionSectionRequest request = + PositionSectionRequest.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + client.positionSection(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSectionItemsTest() throws Exception { + SectionItem responsesElement = SectionItem.newBuilder().build(); + ListSectionItemsResponse expectedResponse = + ListSectionItemsResponse.newBuilder() + .setNextPageToken("") + .addAllSectionItems(Arrays.asList(responsesElement)) + .build(); + mockChatService.addResponse(expectedResponse); + + SectionName parent = SectionName.of("[USER]", "[SECTION]"); + + ListSectionItemsPagedResponse pagedListResponse = client.listSectionItems(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSectionItemsList().get(0), resources.get(0)); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSectionItemsRequest actualRequest = ((ListSectionItemsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSectionItemsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + SectionName parent = SectionName.of("[USER]", "[SECTION]"); + client.listSectionItems(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSectionItemsTest2() throws Exception { + SectionItem responsesElement = SectionItem.newBuilder().build(); + ListSectionItemsResponse expectedResponse = + ListSectionItemsResponse.newBuilder() + .setNextPageToken("") + .addAllSectionItems(Arrays.asList(responsesElement)) + .build(); + mockChatService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSectionItemsPagedResponse pagedListResponse = client.listSectionItems(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSectionItemsList().get(0), resources.get(0)); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSectionItemsRequest actualRequest = ((ListSectionItemsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSectionItemsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSectionItems(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void moveSectionItemTest() throws Exception { + MoveSectionItemResponse expectedResponse = + MoveSectionItemResponse.newBuilder() + .setSectionItem(SectionItem.newBuilder().build()) + .build(); + mockChatService.addResponse(expectedResponse); + + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + + MoveSectionItemResponse actualResponse = client.moveSectionItem(name, targetSection); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + MoveSectionItemRequest actualRequest = ((MoveSectionItemRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(targetSection.toString(), actualRequest.getTargetSection()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void moveSectionItemExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + client.moveSectionItem(name, targetSection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void moveSectionItemTest2() throws Exception { + MoveSectionItemResponse expectedResponse = + MoveSectionItemResponse.newBuilder() + .setSectionItem(SectionItem.newBuilder().build()) + .build(); + mockChatService.addResponse(expectedResponse); + + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + String targetSection = "targetSection-20778988"; + + MoveSectionItemResponse actualResponse = client.moveSectionItem(name, targetSection); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + MoveSectionItemRequest actualRequest = ((MoveSectionItemRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(targetSection, actualRequest.getTargetSection()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void moveSectionItemExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + String targetSection = "targetSection-20778988"; + client.moveSectionItem(name, targetSection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void moveSectionItemTest3() throws Exception { + MoveSectionItemResponse expectedResponse = + MoveSectionItemResponse.newBuilder() + .setSectionItem(SectionItem.newBuilder().build()) + .build(); + mockChatService.addResponse(expectedResponse); + + String name = "name3373707"; + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + + MoveSectionItemResponse actualResponse = client.moveSectionItem(name, targetSection); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + MoveSectionItemRequest actualRequest = ((MoveSectionItemRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(targetSection.toString(), actualRequest.getTargetSection()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void moveSectionItemExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String name = "name3373707"; + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + client.moveSectionItem(name, targetSection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void moveSectionItemTest4() throws Exception { + MoveSectionItemResponse expectedResponse = + MoveSectionItemResponse.newBuilder() + .setSectionItem(SectionItem.newBuilder().build()) + .build(); + mockChatService.addResponse(expectedResponse); + + String name = "name3373707"; + String targetSection = "targetSection-20778988"; + + MoveSectionItemResponse actualResponse = client.moveSectionItem(name, targetSection); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockChatService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + MoveSectionItemRequest actualRequest = ((MoveSectionItemRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(targetSection, actualRequest.getTargetSection()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void moveSectionItemExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockChatService.addException(exception); + + try { + String name = "name3373707"; + String targetSection = "targetSection-20778988"; + client.moveSectionItem(name, targetSection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/MockChatServiceImpl.java b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/MockChatServiceImpl.java index b3ad018d40ec..33c98f3ce115 100644 --- a/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/MockChatServiceImpl.java +++ b/java-chat/google-cloud-chat/src/test/java/com/google/chat/v1/MockChatServiceImpl.java @@ -792,4 +792,150 @@ public void updateSpaceNotificationSetting( Exception.class.getName()))); } } + + @Override + public void createSection( + CreateSectionRequest request, StreamObserver
responseObserver) { + Object response = responses.poll(); + if (response instanceof Section) { + requests.add(request); + responseObserver.onNext(((Section) 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 CreateSection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Section.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSection(DeleteSectionRequest 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 DeleteSection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSection( + UpdateSectionRequest request, StreamObserver
responseObserver) { + Object response = responses.poll(); + if (response instanceof Section) { + requests.add(request); + responseObserver.onNext(((Section) 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 UpdateSection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Section.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSections( + ListSectionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSectionsResponse) { + requests.add(request); + responseObserver.onNext(((ListSectionsResponse) 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 ListSections, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSectionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void positionSection( + PositionSectionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PositionSectionResponse) { + requests.add(request); + responseObserver.onNext(((PositionSectionResponse) 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 PositionSection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PositionSectionResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSectionItems( + ListSectionItemsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSectionItemsResponse) { + requests.add(request); + responseObserver.onNext(((ListSectionItemsResponse) 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 ListSectionItems, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSectionItemsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void moveSectionItem( + MoveSectionItemRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MoveSectionItemResponse) { + requests.add(request); + responseObserver.onNext(((MoveSectionItemResponse) 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 MoveSectionItem, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MoveSectionItemResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java b/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java index fb84dcfaf379..ff694f9e63de 100644 --- a/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java +++ b/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java @@ -1469,6 +1469,290 @@ private ChatServiceGrpc() {} return getUpdateSpaceNotificationSettingMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.CreateSectionRequest, com.google.chat.v1.Section> + getCreateSectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSection", + requestType = com.google.chat.v1.CreateSectionRequest.class, + responseType = com.google.chat.v1.Section.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.CreateSectionRequest, com.google.chat.v1.Section> + getCreateSectionMethod() { + io.grpc.MethodDescriptor + getCreateSectionMethod; + if ((getCreateSectionMethod = ChatServiceGrpc.getCreateSectionMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getCreateSectionMethod = ChatServiceGrpc.getCreateSectionMethod) == null) { + ChatServiceGrpc.getCreateSectionMethod = + getCreateSectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.CreateSectionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.Section.getDefaultInstance())) + .setSchemaDescriptor(new ChatServiceMethodDescriptorSupplier("CreateSection")) + .build(); + } + } + } + return getCreateSectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.DeleteSectionRequest, com.google.protobuf.Empty> + getDeleteSectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSection", + requestType = com.google.chat.v1.DeleteSectionRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.DeleteSectionRequest, com.google.protobuf.Empty> + getDeleteSectionMethod() { + io.grpc.MethodDescriptor + getDeleteSectionMethod; + if ((getDeleteSectionMethod = ChatServiceGrpc.getDeleteSectionMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getDeleteSectionMethod = ChatServiceGrpc.getDeleteSectionMethod) == null) { + ChatServiceGrpc.getDeleteSectionMethod = + getDeleteSectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.DeleteSectionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChatServiceMethodDescriptorSupplier("DeleteSection")) + .build(); + } + } + } + return getDeleteSectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.UpdateSectionRequest, com.google.chat.v1.Section> + getUpdateSectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSection", + requestType = com.google.chat.v1.UpdateSectionRequest.class, + responseType = com.google.chat.v1.Section.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.UpdateSectionRequest, com.google.chat.v1.Section> + getUpdateSectionMethod() { + io.grpc.MethodDescriptor + getUpdateSectionMethod; + if ((getUpdateSectionMethod = ChatServiceGrpc.getUpdateSectionMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getUpdateSectionMethod = ChatServiceGrpc.getUpdateSectionMethod) == null) { + ChatServiceGrpc.getUpdateSectionMethod = + getUpdateSectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.UpdateSectionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.Section.getDefaultInstance())) + .setSchemaDescriptor(new ChatServiceMethodDescriptorSupplier("UpdateSection")) + .build(); + } + } + } + return getUpdateSectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.ListSectionsRequest, com.google.chat.v1.ListSectionsResponse> + getListSectionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSections", + requestType = com.google.chat.v1.ListSectionsRequest.class, + responseType = com.google.chat.v1.ListSectionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.ListSectionsRequest, com.google.chat.v1.ListSectionsResponse> + getListSectionsMethod() { + io.grpc.MethodDescriptor< + com.google.chat.v1.ListSectionsRequest, com.google.chat.v1.ListSectionsResponse> + getListSectionsMethod; + if ((getListSectionsMethod = ChatServiceGrpc.getListSectionsMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getListSectionsMethod = ChatServiceGrpc.getListSectionsMethod) == null) { + ChatServiceGrpc.getListSectionsMethod = + getListSectionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSections")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.ListSectionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.ListSectionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ChatServiceMethodDescriptorSupplier("ListSections")) + .build(); + } + } + } + return getListSectionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.PositionSectionRequest, com.google.chat.v1.PositionSectionResponse> + getPositionSectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PositionSection", + requestType = com.google.chat.v1.PositionSectionRequest.class, + responseType = com.google.chat.v1.PositionSectionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.PositionSectionRequest, com.google.chat.v1.PositionSectionResponse> + getPositionSectionMethod() { + io.grpc.MethodDescriptor< + com.google.chat.v1.PositionSectionRequest, com.google.chat.v1.PositionSectionResponse> + getPositionSectionMethod; + if ((getPositionSectionMethod = ChatServiceGrpc.getPositionSectionMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getPositionSectionMethod = ChatServiceGrpc.getPositionSectionMethod) == null) { + ChatServiceGrpc.getPositionSectionMethod = + getPositionSectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PositionSection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.PositionSectionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.PositionSectionResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ChatServiceMethodDescriptorSupplier("PositionSection")) + .build(); + } + } + } + return getPositionSectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.ListSectionItemsRequest, com.google.chat.v1.ListSectionItemsResponse> + getListSectionItemsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSectionItems", + requestType = com.google.chat.v1.ListSectionItemsRequest.class, + responseType = com.google.chat.v1.ListSectionItemsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.ListSectionItemsRequest, com.google.chat.v1.ListSectionItemsResponse> + getListSectionItemsMethod() { + io.grpc.MethodDescriptor< + com.google.chat.v1.ListSectionItemsRequest, com.google.chat.v1.ListSectionItemsResponse> + getListSectionItemsMethod; + if ((getListSectionItemsMethod = ChatServiceGrpc.getListSectionItemsMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getListSectionItemsMethod = ChatServiceGrpc.getListSectionItemsMethod) == null) { + ChatServiceGrpc.getListSectionItemsMethod = + getListSectionItemsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSectionItems")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.ListSectionItemsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.ListSectionItemsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ChatServiceMethodDescriptorSupplier("ListSectionItems")) + .build(); + } + } + } + return getListSectionItemsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.chat.v1.MoveSectionItemRequest, com.google.chat.v1.MoveSectionItemResponse> + getMoveSectionItemMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "MoveSectionItem", + requestType = com.google.chat.v1.MoveSectionItemRequest.class, + responseType = com.google.chat.v1.MoveSectionItemResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.chat.v1.MoveSectionItemRequest, com.google.chat.v1.MoveSectionItemResponse> + getMoveSectionItemMethod() { + io.grpc.MethodDescriptor< + com.google.chat.v1.MoveSectionItemRequest, com.google.chat.v1.MoveSectionItemResponse> + getMoveSectionItemMethod; + if ((getMoveSectionItemMethod = ChatServiceGrpc.getMoveSectionItemMethod) == null) { + synchronized (ChatServiceGrpc.class) { + if ((getMoveSectionItemMethod = ChatServiceGrpc.getMoveSectionItemMethod) == null) { + ChatServiceGrpc.getMoveSectionItemMethod = + getMoveSectionItemMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MoveSectionItem")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.MoveSectionItemRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.chat.v1.MoveSectionItemResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ChatServiceMethodDescriptorSupplier("MoveSectionItem")) + .build(); + } + } + } + return getMoveSectionItemMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static ChatServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1597,9 +1881,8 @@ default void createMessage( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with the authorization scope: + * approval](https://support.google.com/a?p=chat-app-auth) + * with the authorization scope: * - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When * using this authentication scope, this method only returns public * messages in a space. It doesn't include private messages. @@ -1716,8 +1999,7 @@ default void getMembership( * that invoke the Chat app. * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in - * [Developer Preview](https://developers.google.com/workspace/preview)). + * approval](https://support.google.com/a?p=chat-app-auth). * When using this authentication scope, * this method returns details about a public message in a space. * - [User @@ -2577,12 +2859,13 @@ default void getThreadReadState( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with one of the following authorization scopes: + * approval](https://support.google.com/a?p=chat-app-auth) + * with one of the following authorization scopes: * - `https://www.googleapis.com/auth/chat.app.spaces` + * - `https://www.googleapis.com/auth/chat.app.spaces.readonly` * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * - `https://www.googleapis.com/auth/chat.app.memberships` + * - `https://www.googleapis.com/auth/chat.app.memberships.readonly` * - [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) * with one of the following authorization scopes: @@ -2627,12 +2910,13 @@ default void getSpaceEvent( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with one of the following authorization scopes: + * approval](https://support.google.com/a?p=chat-app-auth) + * with one of the following authorization scopes: * - `https://www.googleapis.com/auth/chat.app.spaces` + * - `https://www.googleapis.com/auth/chat.app.spaces.readonly` * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * - `https://www.googleapis.com/auth/chat.app.memberships` + * - `https://www.googleapis.com/auth/chat.app.memberships.readonly` * - [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) * with one of the following authorization scopes: @@ -2697,6 +2981,160 @@ default void updateSpaceNotificationSetting( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getUpdateSpaceNotificationSettingMethod(), responseObserver); } + + /** + * + * + *
+     * Creates a section in Google Chat. Sections help users group conversations
+     * and customize the list of spaces displayed in Chat navigation panel. Only
+     * sections of type `CUSTOM_SECTION` can be created. For details, see [Create
+     * and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + default void createSection( + com.google.chat.v1.CreateSectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a section of type `CUSTOM_SECTION`.
+     * If the section contains items, such as spaces, the items are moved to
+     * Google Chat's default sections and are not deleted.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + default void deleteSection( + com.google.chat.v1.DeleteSectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + default void updateSection( + com.google.chat.v1.UpdateSectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists sections available to the Chat user. Sections help users group their
+     * conversations and customize the list of spaces displayed in Chat
+     * navigation panel. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + default void listSections( + com.google.chat.v1.ListSectionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSectionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Changes the sort order of a section. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + default void positionSection( + com.google.chat.v1.PositionSectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPositionSectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists items in a section.
+     * Only spaces can be section items. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + default void listSectionItems( + com.google.chat.v1.ListSectionItemsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSectionItemsMethod(), responseObserver); + } + + /** + * + * + *
+     * Moves an item from one section to another. For example, if a section
+     * contains spaces, this method can be used to move a space to a different
+     * section. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + default void moveSectionItem( + com.google.chat.v1.MoveSectionItemRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getMoveSectionItemMethod(), responseObserver); + } } /** @@ -2802,9 +3240,8 @@ public void createMessage( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with the authorization scope: + * approval](https://support.google.com/a?p=chat-app-auth) + * with the authorization scope: * - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When * using this authentication scope, this method only returns public * messages in a space. It doesn't include private messages. @@ -2927,8 +3364,7 @@ public void getMembership( * that invoke the Chat app. * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in - * [Developer Preview](https://developers.google.com/workspace/preview)). + * approval](https://support.google.com/a?p=chat-app-auth). * When using this authentication scope, * this method returns details about a public message in a space. * - [User @@ -3838,12 +4274,13 @@ public void getThreadReadState( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with one of the following authorization scopes: + * approval](https://support.google.com/a?p=chat-app-auth) + * with one of the following authorization scopes: * - `https://www.googleapis.com/auth/chat.app.spaces` + * - `https://www.googleapis.com/auth/chat.app.spaces.readonly` * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * - `https://www.googleapis.com/auth/chat.app.memberships` + * - `https://www.googleapis.com/auth/chat.app.memberships.readonly` * - [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) * with one of the following authorization scopes: @@ -3890,12 +4327,13 @@ public void getSpaceEvent( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with one of the following authorization scopes: + * approval](https://support.google.com/a?p=chat-app-auth) + * with one of the following authorization scopes: * - `https://www.googleapis.com/auth/chat.app.spaces` + * - `https://www.googleapis.com/auth/chat.app.spaces.readonly` * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * - `https://www.googleapis.com/auth/chat.app.memberships` + * - `https://www.googleapis.com/auth/chat.app.memberships.readonly` * - [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) * with one of the following authorization scopes: @@ -3966,6 +4404,174 @@ public void updateSpaceNotificationSetting( request, responseObserver); } + + /** + * + * + *
+     * Creates a section in Google Chat. Sections help users group conversations
+     * and customize the list of spaces displayed in Chat navigation panel. Only
+     * sections of type `CUSTOM_SECTION` can be created. For details, see [Create
+     * and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public void createSection( + com.google.chat.v1.CreateSectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a section of type `CUSTOM_SECTION`.
+     * If the section contains items, such as spaces, the items are moved to
+     * Google Chat's default sections and are not deleted.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public void deleteSection( + com.google.chat.v1.DeleteSectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public void updateSection( + com.google.chat.v1.UpdateSectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists sections available to the Chat user. Sections help users group their
+     * conversations and customize the list of spaces displayed in Chat
+     * navigation panel. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + public void listSections( + com.google.chat.v1.ListSectionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSectionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Changes the sort order of a section. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public void positionSection( + com.google.chat.v1.PositionSectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPositionSectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists items in a section.
+     * Only spaces can be section items. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + public void listSectionItems( + com.google.chat.v1.ListSectionItemsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSectionItemsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Moves an item from one section to another. For example, if a section
+     * contains spaces, this method can be used to move a space to a different
+     * section. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public void moveSectionItem( + com.google.chat.v1.MoveSectionItemRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getMoveSectionItemMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -4052,9 +4658,8 @@ public com.google.chat.v1.Message createMessage(com.google.chat.v1.CreateMessage * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with the authorization scope: + * approval](https://support.google.com/a?p=chat-app-auth) + * with the authorization scope: * - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When * using this authentication scope, this method only returns public * messages in a space. It doesn't include private messages. @@ -4168,8 +4773,7 @@ public com.google.chat.v1.Membership getMembership( * that invoke the Chat app. * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in - * [Developer Preview](https://developers.google.com/workspace/preview)). + * approval](https://support.google.com/a?p=chat-app-auth). * When using this authentication scope, * this method returns details about a public message in a space. * - [User @@ -5005,12 +5609,13 @@ public com.google.chat.v1.ThreadReadState getThreadReadState( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with one of the following authorization scopes: + * approval](https://support.google.com/a?p=chat-app-auth) + * with one of the following authorization scopes: * - `https://www.googleapis.com/auth/chat.app.spaces` + * - `https://www.googleapis.com/auth/chat.app.spaces.readonly` * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * - `https://www.googleapis.com/auth/chat.app.memberships` + * - `https://www.googleapis.com/auth/chat.app.memberships.readonly` * - [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) * with one of the following authorization scopes: @@ -5054,12 +5659,13 @@ public com.google.chat.v1.SpaceEvent getSpaceEvent( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with one of the following authorization scopes: + * approval](https://support.google.com/a?p=chat-app-auth) + * with one of the following authorization scopes: * - `https://www.googleapis.com/auth/chat.app.spaces` + * - `https://www.googleapis.com/auth/chat.app.spaces.readonly` * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * - `https://www.googleapis.com/auth/chat.app.memberships` + * - `https://www.googleapis.com/auth/chat.app.memberships.readonly` * - [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) * with one of the following authorization scopes: @@ -5076,52 +5682,199 @@ public com.google.chat.v1.SpaceEvent getSpaceEvent( * space](https://developers.google.com/workspace/chat/list-space-events). * */ - public com.google.chat.v1.ListSpaceEventsResponse listSpaceEvents( - com.google.chat.v1.ListSpaceEventsRequest request) throws io.grpc.StatusException { + public com.google.chat.v1.ListSpaceEventsResponse listSpaceEvents( + com.google.chat.v1.ListSpaceEventsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSpaceEventsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the space notification setting. For an example, see [Get the
+     * caller's space notification
+     * setting](https://developers.google.com/workspace/chat/get-space-notification-setting).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.spacesettings`
+     * 
+ */ + public com.google.chat.v1.SpaceNotificationSetting getSpaceNotificationSetting( + com.google.chat.v1.GetSpaceNotificationSettingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSpaceNotificationSettingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the space notification setting. For an example, see [Update
+     * the caller's space notification
+     * setting](https://developers.google.com/workspace/chat/update-space-notification-setting).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.spacesettings`
+     * 
+ */ + public com.google.chat.v1.SpaceNotificationSetting updateSpaceNotificationSetting( + com.google.chat.v1.UpdateSpaceNotificationSettingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateSpaceNotificationSettingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a section in Google Chat. Sections help users group conversations
+     * and customize the list of spaces displayed in Chat navigation panel. Only
+     * sections of type `CUSTOM_SECTION` can be created. For details, see [Create
+     * and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.chat.v1.Section createSection(com.google.chat.v1.CreateSectionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateSectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a section of type `CUSTOM_SECTION`.
+     * If the section contains items, such as spaces, the items are moved to
+     * Google Chat's default sections and are not deleted.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.protobuf.Empty deleteSection(com.google.chat.v1.DeleteSectionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteSectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.chat.v1.Section updateSection(com.google.chat.v1.UpdateSectionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateSectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists sections available to the Chat user. Sections help users group their
+     * conversations and customize the list of spaces displayed in Chat
+     * navigation panel. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + public com.google.chat.v1.ListSectionsResponse listSections( + com.google.chat.v1.ListSectionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSectionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Changes the sort order of a section. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.chat.v1.PositionSectionResponse positionSection( + com.google.chat.v1.PositionSectionRequest request) throws io.grpc.StatusException { return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getListSpaceEventsMethod(), getCallOptions(), request); + getChannel(), getPositionSectionMethod(), getCallOptions(), request); } /** * * *
-     * Gets the space notification setting. For an example, see [Get the
-     * caller's space notification
-     * setting](https://developers.google.com/workspace/chat/get-space-notification-setting).
+     * Lists items in a section.
+     * Only spaces can be section items. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
      * Requires [user
      * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
      * with the [authorization
      * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
-     *   - `https://www.googleapis.com/auth/chat.users.spacesettings`
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
      * 
*/ - public com.google.chat.v1.SpaceNotificationSetting getSpaceNotificationSetting( - com.google.chat.v1.GetSpaceNotificationSettingRequest request) - throws io.grpc.StatusException { + public com.google.chat.v1.ListSectionItemsResponse listSectionItems( + com.google.chat.v1.ListSectionItemsRequest request) throws io.grpc.StatusException { return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getGetSpaceNotificationSettingMethod(), getCallOptions(), request); + getChannel(), getListSectionItemsMethod(), getCallOptions(), request); } /** * * *
-     * Updates the space notification setting. For an example, see [Update
-     * the caller's space notification
-     * setting](https://developers.google.com/workspace/chat/update-space-notification-setting).
+     * Moves an item from one section to another. For example, if a section
+     * contains spaces, this method can be used to move a space to a different
+     * section. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
      * Requires [user
      * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
      * with the [authorization
      * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
-     *   - `https://www.googleapis.com/auth/chat.users.spacesettings`
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
      * 
*/ - public com.google.chat.v1.SpaceNotificationSetting updateSpaceNotificationSetting( - com.google.chat.v1.UpdateSpaceNotificationSettingRequest request) - throws io.grpc.StatusException { + public com.google.chat.v1.MoveSectionItemResponse moveSectionItem( + com.google.chat.v1.MoveSectionItemRequest request) throws io.grpc.StatusException { return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getUpdateSpaceNotificationSettingMethod(), getCallOptions(), request); + getChannel(), getMoveSectionItemMethod(), getCallOptions(), request); } } @@ -5209,9 +5962,8 @@ public com.google.chat.v1.Message createMessage( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with the authorization scope: + * approval](https://support.google.com/a?p=chat-app-auth) + * with the authorization scope: * - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When * using this authentication scope, this method only returns public * messages in a space. It doesn't include private messages. @@ -5325,8 +6077,7 @@ public com.google.chat.v1.Membership getMembership( * that invoke the Chat app. * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in - * [Developer Preview](https://developers.google.com/workspace/preview)). + * approval](https://support.google.com/a?p=chat-app-auth). * When using this authentication scope, * this method returns details about a public message in a space. * - [User @@ -6156,12 +6907,13 @@ public com.google.chat.v1.ThreadReadState getThreadReadState( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with one of the following authorization scopes: + * approval](https://support.google.com/a?p=chat-app-auth) + * with one of the following authorization scopes: * - `https://www.googleapis.com/auth/chat.app.spaces` + * - `https://www.googleapis.com/auth/chat.app.spaces.readonly` * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * - `https://www.googleapis.com/auth/chat.app.memberships` + * - `https://www.googleapis.com/auth/chat.app.memberships.readonly` * - [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) * with one of the following authorization scopes: @@ -6205,12 +6957,13 @@ public com.google.chat.v1.SpaceEvent getSpaceEvent( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with one of the following authorization scopes: + * approval](https://support.google.com/a?p=chat-app-auth) + * with one of the following authorization scopes: * - `https://www.googleapis.com/auth/chat.app.spaces` + * - `https://www.googleapis.com/auth/chat.app.spaces.readonly` * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * - `https://www.googleapis.com/auth/chat.app.memberships` + * - `https://www.googleapis.com/auth/chat.app.memberships.readonly` * - [User * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) * with one of the following authorization scopes: @@ -6272,6 +7025,153 @@ public com.google.chat.v1.SpaceNotificationSetting updateSpaceNotificationSettin return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getUpdateSpaceNotificationSettingMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Creates a section in Google Chat. Sections help users group conversations
+     * and customize the list of spaces displayed in Chat navigation panel. Only
+     * sections of type `CUSTOM_SECTION` can be created. For details, see [Create
+     * and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.chat.v1.Section createSection( + com.google.chat.v1.CreateSectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a section of type `CUSTOM_SECTION`.
+     * If the section contains items, such as spaces, the items are moved to
+     * Google Chat's default sections and are not deleted.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.protobuf.Empty deleteSection( + com.google.chat.v1.DeleteSectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.chat.v1.Section updateSection( + com.google.chat.v1.UpdateSectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists sections available to the Chat user. Sections help users group their
+     * conversations and customize the list of spaces displayed in Chat
+     * navigation panel. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + public com.google.chat.v1.ListSectionsResponse listSections( + com.google.chat.v1.ListSectionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSectionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Changes the sort order of a section. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.chat.v1.PositionSectionResponse positionSection( + com.google.chat.v1.PositionSectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPositionSectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists items in a section.
+     * Only spaces can be section items. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + public com.google.chat.v1.ListSectionItemsResponse listSectionItems( + com.google.chat.v1.ListSectionItemsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSectionItemsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Moves an item from one section to another. For example, if a section
+     * contains spaces, this method can be used to move a space to a different
+     * section. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.chat.v1.MoveSectionItemResponse moveSectionItem( + com.google.chat.v1.MoveSectionItemRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getMoveSectionItemMethod(), getCallOptions(), request); + } } /** @@ -6358,9 +7258,8 @@ protected ChatServiceFutureStub build( * - [App * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) in - * [Developer Preview](https://developers.google.com/workspace/preview) - * with the authorization scope: + * approval](https://support.google.com/a?p=chat-app-auth) + * with the authorization scope: * - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When * using this authentication scope, this method only returns public * messages in a space. It doesn't include private messages. @@ -6476,8 +7375,7 @@ protected ChatServiceFutureStub build( * that invoke the Chat app. * - `https://www.googleapis.com/auth/chat.app.messages.readonly` * with [administrator - * approval](https://support.google.com/a?p=chat-app-auth) (available in - * [Developer Preview](https://developers.google.com/workspace/preview)). + * approval](https://support.google.com/a?p=chat-app-auth). * When using this authentication scope, * this method returns details about a public message in a space. * - [User @@ -7318,12 +8216,13 @@ public com.google.common.util.concurrent.ListenableFuture + * Creates a section in Google Chat. Sections help users group conversations + * and customize the list of spaces displayed in Chat navigation panel. Only + * sections of type `CUSTOM_SECTION` can be created. For details, see [Create + * and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + * - `https://www.googleapis.com/auth/chat.users.sections` + * + */ + public com.google.common.util.concurrent.ListenableFuture + createSection(com.google.chat.v1.CreateSectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSectionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a section of type `CUSTOM_SECTION`.
+     * If the section contains items, such as spaces, the items are moved to
+     * Google Chat's default sections and are not deleted.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSection(com.google.chat.v1.DeleteSectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSectionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
+     * For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSection(com.google.chat.v1.UpdateSectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSectionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists sections available to the Chat user. Sections help users group their
+     * conversations and customize the list of spaces displayed in Chat
+     * navigation panel. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.chat.v1.ListSectionsResponse> + listSections(com.google.chat.v1.ListSectionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSectionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Changes the sort order of a section. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.chat.v1.PositionSectionResponse> + positionSection(com.google.chat.v1.PositionSectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPositionSectionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists items in a section.
+     * Only spaces can be section items. For details, see [Create and organize
+     * sections in Google Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     *   - `https://www.googleapis.com/auth/chat.users.sections.readonly`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.chat.v1.ListSectionItemsResponse> + listSectionItems(com.google.chat.v1.ListSectionItemsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSectionItemsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Moves an item from one section to another. For example, if a section
+     * contains spaces, this method can be used to move a space to a different
+     * section. For details, see [Create and organize sections in Google
+     * Chat](https://support.google.com/chat/answer/16059854).
+     * Requires [user
+     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+     * with the [authorization
+     * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+     *   - `https://www.googleapis.com/auth/chat.users.sections`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.chat.v1.MoveSectionItemResponse> + moveSectionItem(com.google.chat.v1.MoveSectionItemRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getMoveSectionItemMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_MESSAGE = 0; @@ -7476,6 +8527,13 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -7680,6 +8738,45 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_SECTION: + serviceImpl.createSection( + (com.google.chat.v1.CreateSectionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SECTION: + serviceImpl.deleteSection( + (com.google.chat.v1.DeleteSectionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SECTION: + serviceImpl.updateSection( + (com.google.chat.v1.UpdateSectionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SECTIONS: + serviceImpl.listSections( + (com.google.chat.v1.ListSectionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_POSITION_SECTION: + serviceImpl.positionSection( + (com.google.chat.v1.PositionSectionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_SECTION_ITEMS: + serviceImpl.listSectionItems( + (com.google.chat.v1.ListSectionItemsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_MOVE_SECTION_ITEM: + serviceImpl.moveSectionItem( + (com.google.chat.v1.MoveSectionItemRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -7911,6 +9008,51 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.chat.v1.UpdateSpaceNotificationSettingRequest, com.google.chat.v1.SpaceNotificationSetting>( service, METHODID_UPDATE_SPACE_NOTIFICATION_SETTING))) + .addMethod( + getCreateSectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.CreateSectionRequest, com.google.chat.v1.Section>( + service, METHODID_CREATE_SECTION))) + .addMethod( + getDeleteSectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.DeleteSectionRequest, com.google.protobuf.Empty>( + service, METHODID_DELETE_SECTION))) + .addMethod( + getUpdateSectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.UpdateSectionRequest, com.google.chat.v1.Section>( + service, METHODID_UPDATE_SECTION))) + .addMethod( + getListSectionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.ListSectionsRequest, + com.google.chat.v1.ListSectionsResponse>(service, METHODID_LIST_SECTIONS))) + .addMethod( + getPositionSectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.PositionSectionRequest, + com.google.chat.v1.PositionSectionResponse>( + service, METHODID_POSITION_SECTION))) + .addMethod( + getListSectionItemsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.ListSectionItemsRequest, + com.google.chat.v1.ListSectionItemsResponse>( + service, METHODID_LIST_SECTION_ITEMS))) + .addMethod( + getMoveSectionItemMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.chat.v1.MoveSectionItemRequest, + com.google.chat.v1.MoveSectionItemResponse>( + service, METHODID_MOVE_SECTION_ITEM))) .build(); } @@ -7997,6 +9139,13 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListSpaceEventsMethod()) .addMethod(getGetSpaceNotificationSettingMethod()) .addMethod(getUpdateSpaceNotificationSettingMethod()) + .addMethod(getCreateSectionMethod()) + .addMethod(getDeleteSectionMethod()) + .addMethod(getUpdateSectionMethod()) + .addMethod(getListSectionsMethod()) + .addMethod(getPositionSectionMethod()) + .addMethod(getListSectionItemsMethod()) + .addMethod(getMoveSectionItemMethod()) .build(); } } diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java index 1964b87e5463..2af0aa39dbc3 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java @@ -53,189 +53,222 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "o\032\027google/api/client.proto\032\037google/chat/" + "v1/attachment.proto\032\037google/chat/v1/memb" + "ership.proto\032\034google/chat/v1/message.pro" - + "to\032\035google/chat/v1/reaction.proto\032\032googl" - + "e/chat/v1/space.proto\032 google/chat/v1/sp" - + "ace_event.proto\032/google/chat/v1/space_no" - + "tification_setting.proto\032%google/chat/v1" - + "/space_read_state.proto\032 google/chat/v1/" - + "space_setup.proto\032&google/chat/v1/thread" - + "_read_state.proto\032\033google/protobuf/empty" - + ".proto2\3005\n\013ChatService\022\233\001\n\rCreateMessage" - + "\022$.google.chat.v1.CreateMessageRequest\032\027" - + ".google.chat.v1.Message\"K\332A\031parent,messa" - + "ge,message_id\202\323\344\223\002)\"\036/v1/{parent=spaces/" - + "*}/messages:\007message\022\212\001\n\014ListMessages\022#." - + "google.chat.v1.ListMessagesRequest\032$.goo" - + "gle.chat.v1.ListMessagesResponse\"/\332A\006par" - + "ent\202\323\344\223\002 \022\036/v1/{parent=spaces/*}/message" - + "s\022\222\001\n\017ListMemberships\022&.google.chat.v1.L" - + "istMembershipsRequest\032\'.google.chat.v1.L" - + "istMembershipsResponse\".\332A\006parent\202\323\344\223\002\037\022" - + "\035/v1/{parent=spaces/*}/members\022\177\n\rGetMem" - + "bership\022$.google.chat.v1.GetMembershipRe" - + "quest\032\032.google.chat.v1.Membership\",\332A\004na" - + "me\202\323\344\223\002\037\022\035/v1/{name=spaces/*/members/*}\022" - + "w\n\nGetMessage\022!.google.chat.v1.GetMessag" - + "eRequest\032\027.google.chat.v1.Message\"-\332A\004na" - + "me\202\323\344\223\002 \022\036/v1/{name=spaces/*/messages/*}" - + "\022\321\001\n\rUpdateMessage\022$.google.chat.v1.Upda" - + "teMessageRequest\032\027.google.chat.v1.Messag" - + "e\"\200\001\332A\023message,update_mask\202\323\344\223\002d\032&/v1/{m" - + "essage.name=spaces/*/messages/*}:\007messag" - + "eZ12&/v1/{message.name=spaces/*/messages" - + "/*}:\007message\022|\n\rDeleteMessage\022$.google.c" - + "hat.v1.DeleteMessageRequest\032\026.google.pro" - + "tobuf.Empty\"-\332A\004name\202\323\344\223\002 *\036/v1/{name=sp" - + "aces/*/messages/*}\022\216\001\n\rGetAttachment\022$.g" - + "oogle.chat.v1.GetAttachmentRequest\032\032.goo" - + "gle.chat.v1.Attachment\";\332A\004name\202\323\344\223\002.\022,/" - + "v1/{name=spaces/*/messages/*/attachments" - + "/*}\022\232\001\n\020UploadAttachment\022\'.google.chat.v" - + "1.UploadAttachmentRequest\032(.google.chat." - + "v1.UploadAttachmentResponse\"3\202\323\344\223\002-\"(/v1" - + "/{parent=spaces/*}/attachments:upload:\001*" - + "\022j\n\nListSpaces\022!.google.chat.v1.ListSpac" - + "esRequest\032\".google.chat.v1.ListSpacesRes" - + "ponse\"\025\332A\000\202\323\344\223\002\014\022\n/v1/spaces\022w\n\014SearchSp" - + "aces\022#.google.chat.v1.SearchSpacesReques" - + "t\032$.google.chat.v1.SearchSpacesResponse\"" - + "\034\332A\000\202\323\344\223\002\023\022\021/v1/spaces:search\022f\n\010GetSpac" - + "e\022\037.google.chat.v1.GetSpaceRequest\032\025.goo" - + "gle.chat.v1.Space\"\"\332A\004name\202\323\344\223\002\025\022\023/v1/{n" - + "ame=spaces/*}\022k\n\013CreateSpace\022\".google.ch" - + "at.v1.CreateSpaceRequest\032\025.google.chat.v" - + "1.Space\"!\332A\005space\202\323\344\223\002\023\"\n/v1/spaces:\005spa" - + "ce\022c\n\nSetUpSpace\022!.google.chat.v1.SetUpS" - + "paceRequest\032\025.google.chat.v1.Space\"\033\202\323\344\223" - + "\002\025\"\020/v1/spaces:setup:\001*\022\206\001\n\013UpdateSpace\022" - + "\".google.chat.v1.UpdateSpaceRequest\032\025.go" - + "ogle.chat.v1.Space\"<\332A\021space,update_mask" - + "\202\323\344\223\002\"2\031/v1/{space.name=spaces/*}:\005space" - + "\022m\n\013DeleteSpace\022\".google.chat.v1.DeleteS" - + "paceRequest\032\026.google.protobuf.Empty\"\"\332A\004" - + "name\202\323\344\223\002\025*\023/v1/{name=spaces/*}\022\235\001\n\023Comp" - + "leteImportSpace\022*.google.chat.v1.Complet" - + "eImportSpaceRequest\032+.google.chat.v1.Com" - + "pleteImportSpaceResponse\"-\202\323\344\223\002\'\"\"/v1/{n" - + "ame=spaces/*}:completeImport:\001*\022z\n\021FindD" - + "irectMessage\022(.google.chat.v1.FindDirect" - + "MessageRequest\032\025.google.chat.v1.Space\"$\202" - + "\323\344\223\002\036\022\034/v1/spaces:findDirectMessage\022\236\001\n\020" - + "CreateMembership\022\'.google.chat.v1.Create" - + "MembershipRequest\032\032.google.chat.v1.Membe" - + "rship\"E\332A\021parent,membership\202\323\344\223\002+\"\035/v1/{" - + "parent=spaces/*}/members:\nmembership\022\256\001\n" - + "\020UpdateMembership\022\'.google.chat.v1.Updat" - + "eMembershipRequest\032\032.google.chat.v1.Memb" - + "ership\"U\332A\026membership,update_mask\202\323\344\223\00262" - + "(/v1/{membership.name=spaces/*/members/*" - + "}:\nmembership\022\205\001\n\020DeleteMembership\022\'.goo" - + "gle.chat.v1.DeleteMembershipRequest\032\032.go" - + "ogle.chat.v1.Membership\",\332A\004name\202\323\344\223\002\037*\035" - + "/v1/{name=spaces/*/members/*}\022\241\001\n\016Create" - + "Reaction\022%.google.chat.v1.CreateReaction" - + "Request\032\030.google.chat.v1.Reaction\"N\332A\017pa" - + "rent,reaction\202\323\344\223\0026\"*/v1/{parent=spaces/" - + "*/messages/*}/reactions:\010reaction\022\231\001\n\rLi" - + "stReactions\022$.google.chat.v1.ListReactio" - + "nsRequest\032%.google.chat.v1.ListReactions" - + "Response\";\332A\006parent\202\323\344\223\002,\022*/v1/{parent=s" - + "paces/*/messages/*}/reactions\022\212\001\n\016Delete" - + "Reaction\022%.google.chat.v1.DeleteReaction" - + "Request\032\026.google.protobuf.Empty\"9\332A\004name" - + "\202\323\344\223\002,**/v1/{name=spaces/*/messages/*/re" - + "actions/*}\022\221\001\n\021CreateCustomEmoji\022(.googl" - + "e.chat.v1.CreateCustomEmojiRequest\032\033.goo" - + "gle.chat.v1.CustomEmoji\"5\332A\014custom_emoji" - + "\202\323\344\223\002 \"\020/v1/customEmojis:\014custom_emoji\022~" - + "\n\016GetCustomEmoji\022%.google.chat.v1.GetCus" - + "tomEmojiRequest\032\033.google.chat.v1.CustomE" - + "moji\"(\332A\004name\202\323\344\223\002\033\022\031/v1/{name=customEmo" - + "jis/*}\022\202\001\n\020ListCustomEmojis\022\'.google.cha" - + "t.v1.ListCustomEmojisRequest\032(.google.ch" - + "at.v1.ListCustomEmojisResponse\"\033\332A\000\202\323\344\223\002" - + "\022\022\020/v1/customEmojis\022\177\n\021DeleteCustomEmoji" - + "\022(.google.chat.v1.DeleteCustomEmojiReque" - + "st\032\026.google.protobuf.Empty\"(\332A\004name\202\323\344\223\002" - + "\033*\031/v1/{name=customEmojis/*}\022\230\001\n\021GetSpac" - + "eReadState\022(.google.chat.v1.GetSpaceRead" - + "StateRequest\032\036.google.chat.v1.SpaceReadS" - + "tate\"9\332A\004name\202\323\344\223\002,\022*/v1/{name=users/*/s" - + "paces/*/spaceReadState}\022\331\001\n\024UpdateSpaceR" - + "eadState\022+.google.chat.v1.UpdateSpaceRea" - + "dStateRequest\032\036.google.chat.v1.SpaceRead" - + "State\"t\332A\034space_read_state,update_mask\202\323" - + "\344\223\002O2;/v1/{space_read_state.name=users/*" - + "/spaces/*/spaceReadState}:\020space_read_st" - + "ate\022\246\001\n\022GetThreadReadState\022).google.chat" - + ".v1.GetThreadReadStateRequest\032\037.google.c" - + "hat.v1.ThreadReadState\"D\332A\004name\202\323\344\223\0027\0225/" - + "v1/{name=users/*/spaces/*/threads/*/thre" - + "adReadState}\022\203\001\n\rGetSpaceEvent\022$.google." - + "chat.v1.GetSpaceEventRequest\032\032.google.ch" - + "at.v1.SpaceEvent\"0\332A\004name\202\323\344\223\002#\022!/v1/{na" - + "me=spaces/*/spaceEvents/*}\022\235\001\n\017ListSpace" - + "Events\022&.google.chat.v1.ListSpaceEventsR" - + "equest\032\'.google.chat.v1.ListSpaceEventsR" - + "esponse\"9\332A\rparent,filter\202\323\344\223\002#\022!/v1/{pa" - + "rent=spaces/*}/spaceEvents\022\300\001\n\033GetSpaceN" - + "otificationSetting\0222.google.chat.v1.GetS" - + "paceNotificationSettingRequest\032(.google." - + "chat.v1.SpaceNotificationSetting\"C\332A\004nam" - + "e\202\323\344\223\0026\0224/v1/{name=users/*/spaces/*/spac" - + "eNotificationSetting}\022\240\002\n\036UpdateSpaceNot" - + "ificationSetting\0225.google.chat.v1.Update" - + "SpaceNotificationSettingRequest\032(.google" - + ".chat.v1.SpaceNotificationSetting\"\234\001\332A&s" - + "pace_notification_setting,update_mask\202\323\344" - + "\223\002m2O/v1/{space_notification_setting.nam" - + "e=users/*/spaces/*/spaceNotificationSett" - + "ing}:\032space_notification_setting\032\326\014\312A\023ch" - + "at.googleapis.com\322A\274\014https://www.googlea" - + "pis.com/auth/chat.admin.delete,https://w" - + "ww.googleapis.com/auth/chat.admin.member" - + "ships,https://www.googleapis.com/auth/ch" - + "at.admin.memberships.readonly,https://ww" - + "w.googleapis.com/auth/chat.admin.spaces," + + "to\032\035google/chat/v1/reaction.proto\032\034googl" + + "e/chat/v1/section.proto\032\032google/chat/v1/" + + "space.proto\032 google/chat/v1/space_event." + + "proto\032/google/chat/v1/space_notification" + + "_setting.proto\032%google/chat/v1/space_rea" + + "d_state.proto\032 google/chat/v1/space_setu" + + "p.proto\032&google/chat/v1/thread_read_stat" + + "e.proto\032\033google/protobuf/empty.proto2\314?\n" + + "\013ChatService\022\233\001\n\rCreateMessage\022$.google." + + "chat.v1.CreateMessageRequest\032\027.google.ch" + + "at.v1.Message\"K\332A\031parent,message,message" + + "_id\202\323\344\223\002)\"\036/v1/{parent=spaces/*}/message" + + "s:\007message\022\212\001\n\014ListMessages\022#.google.cha" + + "t.v1.ListMessagesRequest\032$.google.chat.v" + + "1.ListMessagesResponse\"/\332A\006parent\202\323\344\223\002 \022" + + "\036/v1/{parent=spaces/*}/messages\022\222\001\n\017List" + + "Memberships\022&.google.chat.v1.ListMembers" + + "hipsRequest\032\'.google.chat.v1.ListMembers" + + "hipsResponse\".\332A\006parent\202\323\344\223\002\037\022\035/v1/{pare" + + "nt=spaces/*}/members\022\177\n\rGetMembership\022$." + + "google.chat.v1.GetMembershipRequest\032\032.go" + + "ogle.chat.v1.Membership\",\332A\004name\202\323\344\223\002\037\022\035" + + "/v1/{name=spaces/*/members/*}\022w\n\nGetMess" + + "age\022!.google.chat.v1.GetMessageRequest\032\027" + + ".google.chat.v1.Message\"-\332A\004name\202\323\344\223\002 \022\036" + + "/v1/{name=spaces/*/messages/*}\022\321\001\n\rUpdat" + + "eMessage\022$.google.chat.v1.UpdateMessageR" + + "equest\032\027.google.chat.v1.Message\"\200\001\332A\023mes" + + "sage,update_mask\202\323\344\223\002d\032&/v1/{message.nam" + + "e=spaces/*/messages/*}:\007messageZ12&/v1/{" + + "message.name=spaces/*/messages/*}:\007messa" + + "ge\022|\n\rDeleteMessage\022$.google.chat.v1.Del" + + "eteMessageRequest\032\026.google.protobuf.Empt" + + "y\"-\332A\004name\202\323\344\223\002 *\036/v1/{name=spaces/*/mes" + + "sages/*}\022\216\001\n\rGetAttachment\022$.google.chat" + + ".v1.GetAttachmentRequest\032\032.google.chat.v" + + "1.Attachment\";\332A\004name\202\323\344\223\002.\022,/v1/{name=s" + + "paces/*/messages/*/attachments/*}\022\232\001\n\020Up" + + "loadAttachment\022\'.google.chat.v1.UploadAt" + + "tachmentRequest\032(.google.chat.v1.UploadA" + + "ttachmentResponse\"3\202\323\344\223\002-\"(/v1/{parent=s" + + "paces/*}/attachments:upload:\001*\022j\n\nListSp" + + "aces\022!.google.chat.v1.ListSpacesRequest\032" + + "\".google.chat.v1.ListSpacesResponse\"\025\332A\000" + + "\202\323\344\223\002\014\022\n/v1/spaces\022w\n\014SearchSpaces\022#.goo" + + "gle.chat.v1.SearchSpacesRequest\032$.google" + + ".chat.v1.SearchSpacesResponse\"\034\332A\000\202\323\344\223\002\023" + + "\022\021/v1/spaces:search\022f\n\010GetSpace\022\037.google" + + ".chat.v1.GetSpaceRequest\032\025.google.chat.v" + + "1.Space\"\"\332A\004name\202\323\344\223\002\025\022\023/v1/{name=spaces" + + "/*}\022k\n\013CreateSpace\022\".google.chat.v1.Crea" + + "teSpaceRequest\032\025.google.chat.v1.Space\"!\332" + + "A\005space\202\323\344\223\002\023\"\n/v1/spaces:\005space\022c\n\nSetU" + + "pSpace\022!.google.chat.v1.SetUpSpaceReques" + + "t\032\025.google.chat.v1.Space\"\033\202\323\344\223\002\025\"\020/v1/sp" + + "aces:setup:\001*\022\206\001\n\013UpdateSpace\022\".google.c" + + "hat.v1.UpdateSpaceRequest\032\025.google.chat." + + "v1.Space\"<\332A\021space,update_mask\202\323\344\223\002\"2\031/v" + + "1/{space.name=spaces/*}:\005space\022m\n\013Delete" + + "Space\022\".google.chat.v1.DeleteSpaceReques" + + "t\032\026.google.protobuf.Empty\"\"\332A\004name\202\323\344\223\002\025" + + "*\023/v1/{name=spaces/*}\022\235\001\n\023CompleteImport" + + "Space\022*.google.chat.v1.CompleteImportSpa" + + "ceRequest\032+.google.chat.v1.CompleteImpor" + + "tSpaceResponse\"-\202\323\344\223\002\'\"\"/v1/{name=spaces" + + "/*}:completeImport:\001*\022z\n\021FindDirectMessa" + + "ge\022(.google.chat.v1.FindDirectMessageReq" + + "uest\032\025.google.chat.v1.Space\"$\202\323\344\223\002\036\022\034/v1" + + "/spaces:findDirectMessage\022\236\001\n\020CreateMemb" + + "ership\022\'.google.chat.v1.CreateMembership" + + "Request\032\032.google.chat.v1.Membership\"E\332A\021" + + "parent,membership\202\323\344\223\002+\"\035/v1/{parent=spa" + + "ces/*}/members:\nmembership\022\256\001\n\020UpdateMem" + + "bership\022\'.google.chat.v1.UpdateMembershi" + + "pRequest\032\032.google.chat.v1.Membership\"U\332A" + + "\026membership,update_mask\202\323\344\223\00262(/v1/{memb" + + "ership.name=spaces/*/members/*}:\nmembers" + + "hip\022\205\001\n\020DeleteMembership\022\'.google.chat.v" + + "1.DeleteMembershipRequest\032\032.google.chat." + + "v1.Membership\",\332A\004name\202\323\344\223\002\037*\035/v1/{name=" + + "spaces/*/members/*}\022\241\001\n\016CreateReaction\022%" + + ".google.chat.v1.CreateReactionRequest\032\030." + + "google.chat.v1.Reaction\"N\332A\017parent,react" + + "ion\202\323\344\223\0026\"*/v1/{parent=spaces/*/messages" + + "/*}/reactions:\010reaction\022\231\001\n\rListReaction" + + "s\022$.google.chat.v1.ListReactionsRequest\032" + + "%.google.chat.v1.ListReactionsResponse\";" + + "\332A\006parent\202\323\344\223\002,\022*/v1/{parent=spaces/*/me" + + "ssages/*}/reactions\022\212\001\n\016DeleteReaction\022%" + + ".google.chat.v1.DeleteReactionRequest\032\026." + + "google.protobuf.Empty\"9\332A\004name\202\323\344\223\002,**/v" + + "1/{name=spaces/*/messages/*/reactions/*}" + + "\022\221\001\n\021CreateCustomEmoji\022(.google.chat.v1." + + "CreateCustomEmojiRequest\032\033.google.chat.v" + + "1.CustomEmoji\"5\332A\014custom_emoji\202\323\344\223\002 \"\020/v" + + "1/customEmojis:\014custom_emoji\022~\n\016GetCusto" + + "mEmoji\022%.google.chat.v1.GetCustomEmojiRe" + + "quest\032\033.google.chat.v1.CustomEmoji\"(\332A\004n" + + "ame\202\323\344\223\002\033\022\031/v1/{name=customEmojis/*}\022\202\001\n" + + "\020ListCustomEmojis\022\'.google.chat.v1.ListC" + + "ustomEmojisRequest\032(.google.chat.v1.List" + + "CustomEmojisResponse\"\033\332A\000\202\323\344\223\002\022\022\020/v1/cus" + + "tomEmojis\022\177\n\021DeleteCustomEmoji\022(.google." + + "chat.v1.DeleteCustomEmojiRequest\032\026.googl" + + "e.protobuf.Empty\"(\332A\004name\202\323\344\223\002\033*\031/v1/{na" + + "me=customEmojis/*}\022\230\001\n\021GetSpaceReadState" + + "\022(.google.chat.v1.GetSpaceReadStateReque" + + "st\032\036.google.chat.v1.SpaceReadState\"9\332A\004n" + + "ame\202\323\344\223\002,\022*/v1/{name=users/*/spaces/*/sp" + + "aceReadState}\022\331\001\n\024UpdateSpaceReadState\022+" + + ".google.chat.v1.UpdateSpaceReadStateRequ" + + "est\032\036.google.chat.v1.SpaceReadState\"t\332A\034" + + "space_read_state,update_mask\202\323\344\223\002O2;/v1/" + + "{space_read_state.name=users/*/spaces/*/" + + "spaceReadState}:\020space_read_state\022\246\001\n\022Ge" + + "tThreadReadState\022).google.chat.v1.GetThr" + + "eadReadStateRequest\032\037.google.chat.v1.Thr" + + "eadReadState\"D\332A\004name\202\323\344\223\0027\0225/v1/{name=u" + + "sers/*/spaces/*/threads/*/threadReadStat" + + "e}\022\203\001\n\rGetSpaceEvent\022$.google.chat.v1.Ge" + + "tSpaceEventRequest\032\032.google.chat.v1.Spac" + + "eEvent\"0\332A\004name\202\323\344\223\002#\022!/v1/{name=spaces/" + + "*/spaceEvents/*}\022\235\001\n\017ListSpaceEvents\022&.g" + + "oogle.chat.v1.ListSpaceEventsRequest\032\'.g" + + "oogle.chat.v1.ListSpaceEventsResponse\"9\332" + + "A\rparent,filter\202\323\344\223\002#\022!/v1/{parent=space" + + "s/*}/spaceEvents\022\300\001\n\033GetSpaceNotificatio" + + "nSetting\0222.google.chat.v1.GetSpaceNotifi" + + "cationSettingRequest\032(.google.chat.v1.Sp" + + "aceNotificationSetting\"C\332A\004name\202\323\344\223\0026\0224/" + + "v1/{name=users/*/spaces/*/spaceNotificat" + + "ionSetting}\022\240\002\n\036UpdateSpaceNotificationS" + + "etting\0225.google.chat.v1.UpdateSpaceNotif" + + "icationSettingRequest\032(.google.chat.v1.S" + + "paceNotificationSetting\"\234\001\332A&space_notif" + + "ication_setting,update_mask\202\323\344\223\002m2O/v1/{" + + "space_notification_setting.name=users/*/" + + "spaces/*/spaceNotificationSetting}:\032spac" + + "e_notification_setting\022\217\001\n\rCreateSection" + + "\022$.google.chat.v1.CreateSectionRequest\032\027" + + ".google.chat.v1.Section\"?\332A\016parent,secti" + + "on\202\323\344\223\002(\"\035/v1/{parent=users/*}/sections:" + + "\007section\022{\n\rDeleteSection\022$.google.chat." + + "v1.DeleteSectionRequest\032\026.google.protobu" + + "f.Empty\",\332A\004name\202\323\344\223\002\037*\035/v1/{name=users/" + + "*/sections/*}\022\234\001\n\rUpdateSection\022$.google" + + ".chat.v1.UpdateSectionRequest\032\027.google.c" + + "hat.v1.Section\"L\332A\023section,update_mask\202\323" + + "\344\223\00202%/v1/{section.name=users/*/sections" + + "/*}:\007section\022\211\001\n\014ListSections\022#.google.c" + + "hat.v1.ListSectionsRequest\032$.google.chat" + + ".v1.ListSectionsResponse\".\332A\006parent\202\323\344\223\002" + + "\037\022\035/v1/{parent=users/*}/sections\022\225\001\n\017Pos" + + "itionSection\022&.google.chat.v1.PositionSe" + + "ctionRequest\032\'.google.chat.v1.PositionSe" + + "ctionResponse\"1\202\323\344\223\002+\"&/v1/{name=users/*" + + "/sections/*}:position:\001*\022\235\001\n\020ListSection" + + "Items\022\'.google.chat.v1.ListSectionItemsR" + + "equest\032(.google.chat.v1.ListSectionItems" + + "Response\"6\332A\006parent\202\323\344\223\002\'\022%/v1/{parent=u" + + "sers/*/sections/*}/items\022\257\001\n\017MoveSection" + + "Item\022&.google.chat.v1.MoveSectionItemReq" + + "uest\032\'.google.chat.v1.MoveSectionItemRes" + + "ponse\"K\332A\023name,target_section\202\323\344\223\002/\"*/v1" + + "/{name=users/*/sections/*/items/*}:move:" + + "\001*\032\276\016\312A\023chat.googleapis.com\322A\244\016https://w" + + "ww.googleapis.com/auth/chat.admin.delete" + + ",https://www.googleapis.com/auth/chat.ad" + + "min.memberships,https://www.googleapis.c" + + "om/auth/chat.admin.memberships.readonly," + "https://www.googleapis.com/auth/chat.adm" - + "in.spaces.readonly,https://www.googleapi" - + "s.com/auth/chat.app.delete,https://www.g" - + "oogleapis.com/auth/chat.app.memberships," - + "https://www.googleapis.com/auth/chat.app" - + ".messages.readonly,https://www.googleapi" - + "s.com/auth/chat.app.spaces,https://www.g" - + "oogleapis.com/auth/chat.app.spaces.creat" - + "e,https://www.googleapis.com/auth/chat.b" - + "ot,https://www.googleapis.com/auth/chat." - + "customemojis,https://www.googleapis.com/" - + "auth/chat.customemojis.readonly,https://" - + "www.googleapis.com/auth/chat.delete,http" - + "s://www.googleapis.com/auth/chat.import," - + "https://www.googleapis.com/auth/chat.mem" - + "berships,https://www.googleapis.com/auth" - + "/chat.memberships.app,https://www.google" - + "apis.com/auth/chat.memberships.readonly," - + "https://www.googleapis.com/auth/chat.mes" - + "sages,https://www.googleapis.com/auth/ch" - + "at.messages.create,https://www.googleapi" - + "s.com/auth/chat.messages.reactions,https" - + "://www.googleapis.com/auth/chat.messages" - + ".reactions.create,https://www.googleapis" - + ".com/auth/chat.messages.reactions.readon" + + "in.spaces,https://www.googleapis.com/aut" + + "h/chat.admin.spaces.readonly,https://www" + + ".googleapis.com/auth/chat.app.delete,htt" + + "ps://www.googleapis.com/auth/chat.app.me" + + "mberships,https://www.googleapis.com/aut" + + "h/chat.app.memberships.readonly,https://" + + "www.googleapis.com/auth/chat.app.message" + + "s.readonly,https://www.googleapis.com/au" + + "th/chat.app.spaces,https://www.googleapi" + + "s.com/auth/chat.app.spaces.create,https:" + + "//www.googleapis.com/auth/chat.app.space" + + "s.readonly,https://www.googleapis.com/au" + + "th/chat.bot,https://www.googleapis.com/a" + + "uth/chat.customemojis,https://www.google" + + "apis.com/auth/chat.customemojis.readonly" + + ",https://www.googleapis.com/auth/chat.de" + + "lete,https://www.googleapis.com/auth/cha" + + "t.import,https://www.googleapis.com/auth" + + "/chat.memberships,https://www.googleapis" + + ".com/auth/chat.memberships.app,https://w" + + "ww.googleapis.com/auth/chat.memberships." + + "readonly,https://www.googleapis.com/auth" + + "/chat.messages,https://www.googleapis.co" + + "m/auth/chat.messages.create,https://www." + + "googleapis.com/auth/chat.messages.reacti" + + "ons,https://www.googleapis.com/auth/chat" + + ".messages.reactions.create,https://www.g" + + "oogleapis.com/auth/chat.messages.reactio" + + "ns.readonly,https://www.googleapis.com/a" + + "uth/chat.messages.readonly,https://www.g" + + "oogleapis.com/auth/chat.spaces,https://w" + + "ww.googleapis.com/auth/chat.spaces.creat" + + "e,https://www.googleapis.com/auth/chat.s" + + "paces.readonly,https://www.googleapis.co" + + "m/auth/chat.users.readstate,https://www." + + "googleapis.com/auth/chat.users.readstate" + + ".readonly,https://www.googleapis.com/aut" + + "h/chat.users.sections,https://www.google" + + "apis.com/auth/chat.users.sections.readon" + "ly,https://www.googleapis.com/auth/chat." - + "messages.readonly,https://www.googleapis" - + ".com/auth/chat.spaces,https://www.google" - + "apis.com/auth/chat.spaces.create,https:/" - + "/www.googleapis.com/auth/chat.spaces.rea" - + "donly,https://www.googleapis.com/auth/ch" - + "at.users.readstate,https://www.googleapi" - + "s.com/auth/chat.users.readstate.readonly" - + ",https://www.googleapis.com/auth/chat.us" - + "ers.spacesettingsB\251\001\n\022com.google.chat.v1" - + "B\020ChatServiceProtoP\001Z,cloud.google.com/g" - + "o/chat/apiv1/chatpb;chatpb\242\002\013DYNAPIProto" - + "\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\Cha" - + "t\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" + + "users.spacesettingsB\251\001\n\022com.google.chat." + + "v1B\020ChatServiceProtoP\001Z,cloud.google.com" + + "/go/chat/apiv1/chatpb;chatpb\242\002\013DYNAPIPro" + + "to\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\C" + + "hat\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -247,6 +280,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.chat.v1.MembershipProto.getDescriptor(), com.google.chat.v1.MessageProto.getDescriptor(), com.google.chat.v1.ReactionProto.getDescriptor(), + com.google.chat.v1.SectionProto.getDescriptor(), com.google.chat.v1.SpaceProto.getDescriptor(), com.google.chat.v1.SpaceEventProto.getDescriptor(), com.google.chat.v1.SpaceNotificationSettingProto.getDescriptor(), @@ -262,6 +296,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.chat.v1.MembershipProto.getDescriptor(); com.google.chat.v1.MessageProto.getDescriptor(); com.google.chat.v1.ReactionProto.getDescriptor(); + com.google.chat.v1.SectionProto.getDescriptor(); com.google.chat.v1.SpaceProto.getDescriptor(); com.google.chat.v1.SpaceEventProto.getDescriptor(); com.google.chat.v1.SpaceNotificationSettingProto.getDescriptor(); diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSectionRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSectionRequest.java new file mode 100644 index 000000000000..fb1c25d655aa --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSectionRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for creating a section.
+ * 
+ * + * Protobuf type {@code google.chat.v1.CreateSectionRequest} + */ +@com.google.protobuf.Generated +public final class CreateSectionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.CreateSectionRequest) + CreateSectionRequestOrBuilder { + 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= */ "", + "CreateSectionRequest"); + } + + // Use CreateSectionRequest.newBuilder() to construct. + private CreateSectionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateSectionRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_CreateSectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_CreateSectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.CreateSectionRequest.class, + com.google.chat.v1.CreateSectionRequest.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 where the section is created.
+   *
+   * Format: `users/{user}`
+   * 
+ * + * + * 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 where the section is created.
+   *
+   * Format: `users/{user}`
+   * 
+ * + * + * 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 SECTION_FIELD_NUMBER = 2; + private com.google.chat.v1.Section section_; + + /** + * + * + *
+   * Required. The section to create.
+   * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the section field is set. + */ + @java.lang.Override + public boolean hasSection() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The section to create.
+   * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The section. + */ + @java.lang.Override + public com.google.chat.v1.Section getSection() { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + + /** + * + * + *
+   * Required. The section to create.
+   * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.chat.v1.SectionOrBuilder getSectionOrBuilder() { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + + 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, getSection()); + } + 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, getSection()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.CreateSectionRequest)) { + return super.equals(obj); + } + com.google.chat.v1.CreateSectionRequest other = (com.google.chat.v1.CreateSectionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasSection() != other.hasSection()) return false; + if (hasSection()) { + if (!getSection().equals(other.getSection())) 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 (hasSection()) { + hash = (37 * hash) + SECTION_FIELD_NUMBER; + hash = (53 * hash) + getSection().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.CreateSectionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.CreateSectionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.CreateSectionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.CreateSectionRequest 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 creating a section.
+   * 
+ * + * Protobuf type {@code google.chat.v1.CreateSectionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.CreateSectionRequest) + com.google.chat.v1.CreateSectionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_CreateSectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_CreateSectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.CreateSectionRequest.class, + com.google.chat.v1.CreateSectionRequest.Builder.class); + } + + // Construct using com.google.chat.v1.CreateSectionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSectionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + section_ = null; + if (sectionBuilder_ != null) { + sectionBuilder_.dispose(); + sectionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_CreateSectionRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.CreateSectionRequest getDefaultInstanceForType() { + return com.google.chat.v1.CreateSectionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.CreateSectionRequest build() { + com.google.chat.v1.CreateSectionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.CreateSectionRequest buildPartial() { + com.google.chat.v1.CreateSectionRequest result = + new com.google.chat.v1.CreateSectionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.CreateSectionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.section_ = sectionBuilder_ == null ? section_ : sectionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.CreateSectionRequest) { + return mergeFrom((com.google.chat.v1.CreateSectionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.CreateSectionRequest other) { + if (other == com.google.chat.v1.CreateSectionRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSection()) { + mergeSection(other.getSection()); + } + 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(internalGetSectionFieldBuilder().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 parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name where the section is created.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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 where the section is created.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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 where the section is created.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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 where the section is created.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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 where the section is created.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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.chat.v1.Section section_; + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder> + sectionBuilder_; + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the section field is set. + */ + public boolean hasSection() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The section. + */ + public com.google.chat.v1.Section getSection() { + if (sectionBuilder_ == null) { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } else { + return sectionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setSection(com.google.chat.v1.Section value) { + if (sectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + section_ = value; + } else { + sectionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setSection(com.google.chat.v1.Section.Builder builderForValue) { + if (sectionBuilder_ == null) { + section_ = builderForValue.build(); + } else { + sectionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeSection(com.google.chat.v1.Section value) { + if (sectionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && section_ != null + && section_ != com.google.chat.v1.Section.getDefaultInstance()) { + getSectionBuilder().mergeFrom(value); + } else { + section_ = value; + } + } else { + sectionBuilder_.mergeFrom(value); + } + if (section_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearSection() { + bitField0_ = (bitField0_ & ~0x00000002); + section_ = null; + if (sectionBuilder_ != null) { + sectionBuilder_.dispose(); + sectionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.chat.v1.Section.Builder getSectionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSectionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.chat.v1.SectionOrBuilder getSectionOrBuilder() { + if (sectionBuilder_ != null) { + return sectionBuilder_.getMessageOrBuilder(); + } else { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + } + + /** + * + * + *
+     * Required. The section to create.
+     * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder> + internalGetSectionFieldBuilder() { + if (sectionBuilder_ == null) { + sectionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder>( + getSection(), getParentForChildren(), isClean()); + section_ = null; + } + return sectionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.CreateSectionRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.CreateSectionRequest) + private static final com.google.chat.v1.CreateSectionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.CreateSectionRequest(); + } + + public static com.google.chat.v1.CreateSectionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSectionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.CreateSectionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSectionRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSectionRequestOrBuilder.java new file mode 100644 index 000000000000..dbe0d4e26ac8 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateSectionRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface CreateSectionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.CreateSectionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name where the section is created.
+   *
+   * Format: `users/{user}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name where the section is created.
+   *
+   * Format: `users/{user}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The section to create.
+   * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the section field is set. + */ + boolean hasSection(); + + /** + * + * + *
+   * Required. The section to create.
+   * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The section. + */ + com.google.chat.v1.Section getSection(); + + /** + * + * + *
+   * Required. The section to create.
+   * 
+ * + * .google.chat.v1.Section section = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.chat.v1.SectionOrBuilder getSectionOrBuilder(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteSectionRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteSectionRequest.java new file mode 100644 index 000000000000..fb047c66c8bb --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteSectionRequest.java @@ -0,0 +1,624 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for deleting a section.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ * 
+ * + * Protobuf type {@code google.chat.v1.DeleteSectionRequest} + */ +@com.google.protobuf.Generated +public final class DeleteSectionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.DeleteSectionRequest) + DeleteSectionRequestOrBuilder { + 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= */ "", + "DeleteSectionRequest"); + } + + // Use DeleteSectionRequest.newBuilder() to construct. + private DeleteSectionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteSectionRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_DeleteSectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_DeleteSectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.DeleteSectionRequest.class, + com.google.chat.v1.DeleteSectionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the section to delete.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * 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 section to delete.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * 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.chat.v1.DeleteSectionRequest)) { + return super.equals(obj); + } + com.google.chat.v1.DeleteSectionRequest other = (com.google.chat.v1.DeleteSectionRequest) 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.chat.v1.DeleteSectionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.DeleteSectionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.DeleteSectionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.DeleteSectionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.DeleteSectionRequest 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 deleting a section.
+   * [Developer Preview](https://developers.google.com/workspace/preview).
+   * 
+ * + * Protobuf type {@code google.chat.v1.DeleteSectionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.DeleteSectionRequest) + com.google.chat.v1.DeleteSectionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_DeleteSectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_DeleteSectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.DeleteSectionRequest.class, + com.google.chat.v1.DeleteSectionRequest.Builder.class); + } + + // Construct using com.google.chat.v1.DeleteSectionRequest.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.chat.v1.SectionProto + .internal_static_google_chat_v1_DeleteSectionRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.DeleteSectionRequest getDefaultInstanceForType() { + return com.google.chat.v1.DeleteSectionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.DeleteSectionRequest build() { + com.google.chat.v1.DeleteSectionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.DeleteSectionRequest buildPartial() { + com.google.chat.v1.DeleteSectionRequest result = + new com.google.chat.v1.DeleteSectionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.DeleteSectionRequest 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.chat.v1.DeleteSectionRequest) { + return mergeFrom((com.google.chat.v1.DeleteSectionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.DeleteSectionRequest other) { + if (other == com.google.chat.v1.DeleteSectionRequest.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 section to delete.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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 section to delete.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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 section to delete.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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 section to delete.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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 section to delete.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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.chat.v1.DeleteSectionRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.DeleteSectionRequest) + private static final com.google.chat.v1.DeleteSectionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.DeleteSectionRequest(); + } + + public static com.google.chat.v1.DeleteSectionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSectionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.DeleteSectionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteSectionRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteSectionRequestOrBuilder.java new file mode 100644 index 000000000000..8dce10841627 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeleteSectionRequestOrBuilder.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/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface DeleteSectionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.DeleteSectionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the section to delete.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the section to delete.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * 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-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsRequest.java new file mode 100644 index 000000000000..d89812d427f8 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsRequest.java @@ -0,0 +1,1242 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for listing section items.
+ * 
+ * + * Protobuf type {@code google.chat.v1.ListSectionItemsRequest} + */ +@com.google.protobuf.Generated +public final class ListSectionItemsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.ListSectionItemsRequest) + ListSectionItemsRequestOrBuilder { + 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= */ "", + "ListSectionItemsRequest"); + } + + // Use ListSectionItemsRequest.newBuilder() to construct. + private ListSectionItemsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListSectionItemsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListSectionItemsRequest.class, + com.google.chat.v1.ListSectionItemsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent, which is the section resource name that owns this
+   * collection of section items. Only supports listing section items for the
+   * calling user.
+   *
+   * When you're filtering by space, use the wildcard `-` to search across all
+   * sections. For example, `users/{user}/sections/-`.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * 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, which is the section resource name that owns this
+   * collection of section items. Only supports listing section items for the
+   * calling user.
+   *
+   * When you're filtering by space, use the wildcard `-` to search across all
+   * sections. For example, `users/{user}/sections/-`.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * 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. The maximum number of section items to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 10 section items will be returned.
+   *
+   * The maximum value is 100. If you use a value more than 100, it's
+   * automatically changed to 100.
+   *
+   * Negative values return an `INVALID_ARGUMENT` error.
+   * 
+ * + * 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 list section items call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 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 list section items call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 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. A query filter.
+   *
+   * Currently only supports filtering by space.
+   *
+   * For example, `space = spaces/{space}`.
+   *
+   * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+   * 
+ * + * 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. A query filter.
+   *
+   * Currently only supports filtering by space.
+   *
+   * For example, `space = spaces/{space}`.
+   *
+   * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+   * 
+ * + * 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.chat.v1.ListSectionItemsRequest)) { + return super.equals(obj); + } + com.google.chat.v1.ListSectionItemsRequest other = + (com.google.chat.v1.ListSectionItemsRequest) 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.chat.v1.ListSectionItemsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionItemsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.ListSectionItemsRequest 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 listing section items.
+   * 
+ * + * Protobuf type {@code google.chat.v1.ListSectionItemsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.ListSectionItemsRequest) + com.google.chat.v1.ListSectionItemsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListSectionItemsRequest.class, + com.google.chat.v1.ListSectionItemsRequest.Builder.class); + } + + // Construct using com.google.chat.v1.ListSectionItemsRequest.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.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.ListSectionItemsRequest getDefaultInstanceForType() { + return com.google.chat.v1.ListSectionItemsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.ListSectionItemsRequest build() { + com.google.chat.v1.ListSectionItemsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.ListSectionItemsRequest buildPartial() { + com.google.chat.v1.ListSectionItemsRequest result = + new com.google.chat.v1.ListSectionItemsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.ListSectionItemsRequest 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.chat.v1.ListSectionItemsRequest) { + return mergeFrom((com.google.chat.v1.ListSectionItemsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.ListSectionItemsRequest other) { + if (other == com.google.chat.v1.ListSectionItemsRequest.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, which is the section resource name that owns this
+     * collection of section items. Only supports listing section items for the
+     * calling user.
+     *
+     * When you're filtering by space, use the wildcard `-` to search across all
+     * sections. For example, `users/{user}/sections/-`.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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, which is the section resource name that owns this
+     * collection of section items. Only supports listing section items for the
+     * calling user.
+     *
+     * When you're filtering by space, use the wildcard `-` to search across all
+     * sections. For example, `users/{user}/sections/-`.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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, which is the section resource name that owns this
+     * collection of section items. Only supports listing section items for the
+     * calling user.
+     *
+     * When you're filtering by space, use the wildcard `-` to search across all
+     * sections. For example, `users/{user}/sections/-`.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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, which is the section resource name that owns this
+     * collection of section items. Only supports listing section items for the
+     * calling user.
+     *
+     * When you're filtering by space, use the wildcard `-` to search across all
+     * sections. For example, `users/{user}/sections/-`.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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, which is the section resource name that owns this
+     * collection of section items. Only supports listing section items for the
+     * calling user.
+     *
+     * When you're filtering by space, use the wildcard `-` to search across all
+     * sections. For example, `users/{user}/sections/-`.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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. The maximum number of section items to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 10 section items will be returned.
+     *
+     * The maximum value is 100. If you use a value more than 100, it's
+     * automatically changed to 100.
+     *
+     * Negative values return an `INVALID_ARGUMENT` error.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of section items to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 10 section items will be returned.
+     *
+     * The maximum value is 100. If you use a value more than 100, it's
+     * automatically changed to 100.
+     *
+     * Negative values return an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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. The maximum number of section items to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 10 section items will be returned.
+     *
+     * The maximum value is 100. If you use a value more than 100, it's
+     * automatically changed to 100.
+     *
+     * Negative values return an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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 list section items call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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 list section items call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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 list section items call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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 list section items call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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 list section items call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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. A query filter.
+     *
+     * Currently only supports filtering by space.
+     *
+     * For example, `space = spaces/{space}`.
+     *
+     * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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. A query filter.
+     *
+     * Currently only supports filtering by space.
+     *
+     * For example, `space = spaces/{space}`.
+     *
+     * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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. A query filter.
+     *
+     * Currently only supports filtering by space.
+     *
+     * For example, `space = spaces/{space}`.
+     *
+     * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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. A query filter.
+     *
+     * Currently only supports filtering by space.
+     *
+     * For example, `space = spaces/{space}`.
+     *
+     * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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. A query filter.
+     *
+     * Currently only supports filtering by space.
+     *
+     * For example, `space = spaces/{space}`.
+     *
+     * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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.chat.v1.ListSectionItemsRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.ListSectionItemsRequest) + private static final com.google.chat.v1.ListSectionItemsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.ListSectionItemsRequest(); + } + + public static com.google.chat.v1.ListSectionItemsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSectionItemsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.ListSectionItemsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsRequestOrBuilder.java new file mode 100644 index 000000000000..8f1b2b011c7c --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface ListSectionItemsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.ListSectionItemsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which is the section resource name that owns this
+   * collection of section items. Only supports listing section items for the
+   * calling user.
+   *
+   * When you're filtering by space, use the wildcard `-` to search across all
+   * sections. For example, `users/{user}/sections/-`.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent, which is the section resource name that owns this
+   * collection of section items. Only supports listing section items for the
+   * calling user.
+   *
+   * When you're filtering by space, use the wildcard `-` to search across all
+   * sections. For example, `users/{user}/sections/-`.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of section items to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 10 section items will be returned.
+   *
+   * The maximum value is 100. If you use a value more than 100, it's
+   * automatically changed to 100.
+   *
+   * Negative values return an `INVALID_ARGUMENT` error.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous list section items call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous list section items call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A query filter.
+   *
+   * Currently only supports filtering by space.
+   *
+   * For example, `space = spaces/{space}`.
+   *
+   * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A query filter.
+   *
+   * Currently only supports filtering by space.
+   *
+   * For example, `space = spaces/{space}`.
+   *
+   * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsResponse.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsResponse.java new file mode 100644 index 000000000000..a7515c37dad3 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsResponse.java @@ -0,0 +1,1114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Response message for listing section items.
+ * 
+ * + * Protobuf type {@code google.chat.v1.ListSectionItemsResponse} + */ +@com.google.protobuf.Generated +public final class ListSectionItemsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.ListSectionItemsResponse) + ListSectionItemsResponseOrBuilder { + 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= */ "", + "ListSectionItemsResponse"); + } + + // Use ListSectionItemsResponse.newBuilder() to construct. + private ListSectionItemsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListSectionItemsResponse() { + sectionItems_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListSectionItemsResponse.class, + com.google.chat.v1.ListSectionItemsResponse.Builder.class); + } + + public static final int SECTION_ITEMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List sectionItems_; + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + @java.lang.Override + public java.util.List getSectionItemsList() { + return sectionItems_; + } + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + @java.lang.Override + public java.util.List + getSectionItemsOrBuilderList() { + return sectionItems_; + } + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + @java.lang.Override + public int getSectionItemsCount() { + return sectionItems_.size(); + } + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + @java.lang.Override + public com.google.chat.v1.SectionItem getSectionItems(int index) { + return sectionItems_.get(index); + } + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + @java.lang.Override + public com.google.chat.v1.SectionItemOrBuilder getSectionItemsOrBuilder(int index) { + return sectionItems_.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 < sectionItems_.size(); i++) { + output.writeMessage(1, sectionItems_.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 < sectionItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sectionItems_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.ListSectionItemsResponse)) { + return super.equals(obj); + } + com.google.chat.v1.ListSectionItemsResponse other = + (com.google.chat.v1.ListSectionItemsResponse) obj; + + if (!getSectionItemsList().equals(other.getSectionItemsList())) 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 (getSectionItemsCount() > 0) { + hash = (37 * hash) + SECTION_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getSectionItemsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionItemsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.ListSectionItemsResponse 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 listing section items.
+   * 
+ * + * Protobuf type {@code google.chat.v1.ListSectionItemsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.ListSectionItemsResponse) + com.google.chat.v1.ListSectionItemsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListSectionItemsResponse.class, + com.google.chat.v1.ListSectionItemsResponse.Builder.class); + } + + // Construct using com.google.chat.v1.ListSectionItemsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (sectionItemsBuilder_ == null) { + sectionItems_ = java.util.Collections.emptyList(); + } else { + sectionItems_ = null; + sectionItemsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionItemsResponse_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.ListSectionItemsResponse getDefaultInstanceForType() { + return com.google.chat.v1.ListSectionItemsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.ListSectionItemsResponse build() { + com.google.chat.v1.ListSectionItemsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.ListSectionItemsResponse buildPartial() { + com.google.chat.v1.ListSectionItemsResponse result = + new com.google.chat.v1.ListSectionItemsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.chat.v1.ListSectionItemsResponse result) { + if (sectionItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sectionItems_ = java.util.Collections.unmodifiableList(sectionItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sectionItems_ = sectionItems_; + } else { + result.sectionItems_ = sectionItemsBuilder_.build(); + } + } + + private void buildPartial0(com.google.chat.v1.ListSectionItemsResponse 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.chat.v1.ListSectionItemsResponse) { + return mergeFrom((com.google.chat.v1.ListSectionItemsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.ListSectionItemsResponse other) { + if (other == com.google.chat.v1.ListSectionItemsResponse.getDefaultInstance()) return this; + if (sectionItemsBuilder_ == null) { + if (!other.sectionItems_.isEmpty()) { + if (sectionItems_.isEmpty()) { + sectionItems_ = other.sectionItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSectionItemsIsMutable(); + sectionItems_.addAll(other.sectionItems_); + } + onChanged(); + } + } else { + if (!other.sectionItems_.isEmpty()) { + if (sectionItemsBuilder_.isEmpty()) { + sectionItemsBuilder_.dispose(); + sectionItemsBuilder_ = null; + sectionItems_ = other.sectionItems_; + bitField0_ = (bitField0_ & ~0x00000001); + sectionItemsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSectionItemsFieldBuilder() + : null; + } else { + sectionItemsBuilder_.addAllMessages(other.sectionItems_); + } + } + } + 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.chat.v1.SectionItem m = + input.readMessage(com.google.chat.v1.SectionItem.parser(), extensionRegistry); + if (sectionItemsBuilder_ == null) { + ensureSectionItemsIsMutable(); + sectionItems_.add(m); + } else { + sectionItemsBuilder_.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 sectionItems_ = + java.util.Collections.emptyList(); + + private void ensureSectionItemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sectionItems_ = new java.util.ArrayList(sectionItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.SectionItem, + com.google.chat.v1.SectionItem.Builder, + com.google.chat.v1.SectionItemOrBuilder> + sectionItemsBuilder_; + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public java.util.List getSectionItemsList() { + if (sectionItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sectionItems_); + } else { + return sectionItemsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public int getSectionItemsCount() { + if (sectionItemsBuilder_ == null) { + return sectionItems_.size(); + } else { + return sectionItemsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public com.google.chat.v1.SectionItem getSectionItems(int index) { + if (sectionItemsBuilder_ == null) { + return sectionItems_.get(index); + } else { + return sectionItemsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder setSectionItems(int index, com.google.chat.v1.SectionItem value) { + if (sectionItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSectionItemsIsMutable(); + sectionItems_.set(index, value); + onChanged(); + } else { + sectionItemsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder setSectionItems( + int index, com.google.chat.v1.SectionItem.Builder builderForValue) { + if (sectionItemsBuilder_ == null) { + ensureSectionItemsIsMutable(); + sectionItems_.set(index, builderForValue.build()); + onChanged(); + } else { + sectionItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder addSectionItems(com.google.chat.v1.SectionItem value) { + if (sectionItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSectionItemsIsMutable(); + sectionItems_.add(value); + onChanged(); + } else { + sectionItemsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder addSectionItems(int index, com.google.chat.v1.SectionItem value) { + if (sectionItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSectionItemsIsMutable(); + sectionItems_.add(index, value); + onChanged(); + } else { + sectionItemsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder addSectionItems(com.google.chat.v1.SectionItem.Builder builderForValue) { + if (sectionItemsBuilder_ == null) { + ensureSectionItemsIsMutable(); + sectionItems_.add(builderForValue.build()); + onChanged(); + } else { + sectionItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder addSectionItems( + int index, com.google.chat.v1.SectionItem.Builder builderForValue) { + if (sectionItemsBuilder_ == null) { + ensureSectionItemsIsMutable(); + sectionItems_.add(index, builderForValue.build()); + onChanged(); + } else { + sectionItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder addAllSectionItems( + java.lang.Iterable values) { + if (sectionItemsBuilder_ == null) { + ensureSectionItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sectionItems_); + onChanged(); + } else { + sectionItemsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder clearSectionItems() { + if (sectionItemsBuilder_ == null) { + sectionItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sectionItemsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public Builder removeSectionItems(int index) { + if (sectionItemsBuilder_ == null) { + ensureSectionItemsIsMutable(); + sectionItems_.remove(index); + onChanged(); + } else { + sectionItemsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public com.google.chat.v1.SectionItem.Builder getSectionItemsBuilder(int index) { + return internalGetSectionItemsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public com.google.chat.v1.SectionItemOrBuilder getSectionItemsOrBuilder(int index) { + if (sectionItemsBuilder_ == null) { + return sectionItems_.get(index); + } else { + return sectionItemsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public java.util.List + getSectionItemsOrBuilderList() { + if (sectionItemsBuilder_ != null) { + return sectionItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sectionItems_); + } + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public com.google.chat.v1.SectionItem.Builder addSectionItemsBuilder() { + return internalGetSectionItemsFieldBuilder() + .addBuilder(com.google.chat.v1.SectionItem.getDefaultInstance()); + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public com.google.chat.v1.SectionItem.Builder addSectionItemsBuilder(int index) { + return internalGetSectionItemsFieldBuilder() + .addBuilder(index, com.google.chat.v1.SectionItem.getDefaultInstance()); + } + + /** + * + * + *
+     * The section items from the specified section.
+     * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + public java.util.List getSectionItemsBuilderList() { + return internalGetSectionItemsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.SectionItem, + com.google.chat.v1.SectionItem.Builder, + com.google.chat.v1.SectionItemOrBuilder> + internalGetSectionItemsFieldBuilder() { + if (sectionItemsBuilder_ == null) { + sectionItemsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.SectionItem, + com.google.chat.v1.SectionItem.Builder, + com.google.chat.v1.SectionItemOrBuilder>( + sectionItems_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sectionItems_ = null; + } + return sectionItemsBuilder_; + } + + 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.chat.v1.ListSectionItemsResponse) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.ListSectionItemsResponse) + private static final com.google.chat.v1.ListSectionItemsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.ListSectionItemsResponse(); + } + + public static com.google.chat.v1.ListSectionItemsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSectionItemsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.ListSectionItemsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsResponseOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsResponseOrBuilder.java new file mode 100644 index 000000000000..f94f031c89ff --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionItemsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface ListSectionItemsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.ListSectionItemsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + java.util.List getSectionItemsList(); + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + com.google.chat.v1.SectionItem getSectionItems(int index); + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + int getSectionItemsCount(); + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + java.util.List getSectionItemsOrBuilderList(); + + /** + * + * + *
+   * The section items from the specified section.
+   * 
+ * + * repeated .google.chat.v1.SectionItem section_items = 1; + */ + com.google.chat.v1.SectionItemOrBuilder getSectionItemsOrBuilder(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-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsRequest.java new file mode 100644 index 000000000000..9cb5b1769335 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsRequest.java @@ -0,0 +1,1031 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for listing sections.
+ * 
+ * + * Protobuf type {@code google.chat.v1.ListSectionsRequest} + */ +@com.google.protobuf.Generated +public final class ListSectionsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.ListSectionsRequest) + ListSectionsRequestOrBuilder { + 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= */ "", + "ListSectionsRequest"); + } + + // Use ListSectionsRequest.newBuilder() to construct. + private ListSectionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListSectionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListSectionsRequest.class, + com.google.chat.v1.ListSectionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent, which is the user resource name that owns this
+   * collection of sections. Only supports listing sections for the calling
+   * user. To refer to the calling user, set one of the following:
+   *
+   * - The `me` alias. For example, `users/me`.
+   *
+   * - Their Workspace email address. For example, `users/user@example.com`.
+   *
+   * - Their user id. For example, `users/123456789`.
+   *
+   * Format: `users/{user}`
+   * 
+ * + * + * 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, which is the user resource name that owns this
+   * collection of sections. Only supports listing sections for the calling
+   * user. To refer to the calling user, set one of the following:
+   *
+   * - The `me` alias. For example, `users/me`.
+   *
+   * - Their Workspace email address. For example, `users/user@example.com`.
+   *
+   * - Their user id. For example, `users/123456789`.
+   *
+   * Format: `users/{user}`
+   * 
+ * + * + * 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. The maximum number of sections to return. The service may return
+   * fewer than this value.
+   *
+   * If unspecified, at most 10 sections will be returned.
+   *
+   * The maximum value is 100. If you use a value more than 100, it's
+   * automatically changed to 100.
+   *
+   * Negative values return an `INVALID_ARGUMENT` error.
+   * 
+ * + * 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 list sections call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 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 list sections call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 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; + } + } + + 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.chat.v1.ListSectionsRequest)) { + return super.equals(obj); + } + com.google.chat.v1.ListSectionsRequest other = (com.google.chat.v1.ListSectionsRequest) 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.chat.v1.ListSectionsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.ListSectionsRequest 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 listing sections.
+   * 
+ * + * Protobuf type {@code google.chat.v1.ListSectionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.ListSectionsRequest) + com.google.chat.v1.ListSectionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListSectionsRequest.class, + com.google.chat.v1.ListSectionsRequest.Builder.class); + } + + // Construct using com.google.chat.v1.ListSectionsRequest.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.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.ListSectionsRequest getDefaultInstanceForType() { + return com.google.chat.v1.ListSectionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.ListSectionsRequest build() { + com.google.chat.v1.ListSectionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.ListSectionsRequest buildPartial() { + com.google.chat.v1.ListSectionsRequest result = + new com.google.chat.v1.ListSectionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.ListSectionsRequest 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.chat.v1.ListSectionsRequest) { + return mergeFrom((com.google.chat.v1.ListSectionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.ListSectionsRequest other) { + if (other == com.google.chat.v1.ListSectionsRequest.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, which is the user resource name that owns this
+     * collection of sections. Only supports listing sections for the calling
+     * user. To refer to the calling user, set one of the following:
+     *
+     * - The `me` alias. For example, `users/me`.
+     *
+     * - Their Workspace email address. For example, `users/user@example.com`.
+     *
+     * - Their user id. For example, `users/123456789`.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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, which is the user resource name that owns this
+     * collection of sections. Only supports listing sections for the calling
+     * user. To refer to the calling user, set one of the following:
+     *
+     * - The `me` alias. For example, `users/me`.
+     *
+     * - Their Workspace email address. For example, `users/user@example.com`.
+     *
+     * - Their user id. For example, `users/123456789`.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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, which is the user resource name that owns this
+     * collection of sections. Only supports listing sections for the calling
+     * user. To refer to the calling user, set one of the following:
+     *
+     * - The `me` alias. For example, `users/me`.
+     *
+     * - Their Workspace email address. For example, `users/user@example.com`.
+     *
+     * - Their user id. For example, `users/123456789`.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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, which is the user resource name that owns this
+     * collection of sections. Only supports listing sections for the calling
+     * user. To refer to the calling user, set one of the following:
+     *
+     * - The `me` alias. For example, `users/me`.
+     *
+     * - Their Workspace email address. For example, `users/user@example.com`.
+     *
+     * - Their user id. For example, `users/123456789`.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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, which is the user resource name that owns this
+     * collection of sections. Only supports listing sections for the calling
+     * user. To refer to the calling user, set one of the following:
+     *
+     * - The `me` alias. For example, `users/me`.
+     *
+     * - Their Workspace email address. For example, `users/user@example.com`.
+     *
+     * - Their user id. For example, `users/123456789`.
+     *
+     * Format: `users/{user}`
+     * 
+ * + * + * 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. The maximum number of sections to return. The service may return
+     * fewer than this value.
+     *
+     * If unspecified, at most 10 sections will be returned.
+     *
+     * The maximum value is 100. If you use a value more than 100, it's
+     * automatically changed to 100.
+     *
+     * Negative values return an `INVALID_ARGUMENT` error.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of sections to return. The service may return
+     * fewer than this value.
+     *
+     * If unspecified, at most 10 sections will be returned.
+     *
+     * The maximum value is 100. If you use a value more than 100, it's
+     * automatically changed to 100.
+     *
+     * Negative values return an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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. The maximum number of sections to return. The service may return
+     * fewer than this value.
+     *
+     * If unspecified, at most 10 sections will be returned.
+     *
+     * The maximum value is 100. If you use a value more than 100, it's
+     * automatically changed to 100.
+     *
+     * Negative values return an `INVALID_ARGUMENT` error.
+     * 
+ * + * 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 list sections call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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 list sections call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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 list sections call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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 list sections call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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 list sections call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided should match the call that
+     * provided the page token. Passing different values to the other parameters
+     * might lead to unexpected results.
+     * 
+ * + * string page_token = 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; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.ListSectionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.ListSectionsRequest) + private static final com.google.chat.v1.ListSectionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.ListSectionsRequest(); + } + + public static com.google.chat.v1.ListSectionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSectionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.ListSectionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsRequestOrBuilder.java new file mode 100644 index 000000000000..e5d58e1ea333 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsRequestOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface ListSectionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.ListSectionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which is the user resource name that owns this
+   * collection of sections. Only supports listing sections for the calling
+   * user. To refer to the calling user, set one of the following:
+   *
+   * - The `me` alias. For example, `users/me`.
+   *
+   * - Their Workspace email address. For example, `users/user@example.com`.
+   *
+   * - Their user id. For example, `users/123456789`.
+   *
+   * Format: `users/{user}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent, which is the user resource name that owns this
+   * collection of sections. Only supports listing sections for the calling
+   * user. To refer to the calling user, set one of the following:
+   *
+   * - The `me` alias. For example, `users/me`.
+   *
+   * - Their Workspace email address. For example, `users/user@example.com`.
+   *
+   * - Their user id. For example, `users/123456789`.
+   *
+   * Format: `users/{user}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of sections to return. The service may return
+   * fewer than this value.
+   *
+   * If unspecified, at most 10 sections will be returned.
+   *
+   * The maximum value is 100. If you use a value more than 100, it's
+   * automatically changed to 100.
+   *
+   * Negative values return an `INVALID_ARGUMENT` error.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous list sections call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous list sections call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided should match the call that
+   * provided the page token. Passing different values to the other parameters
+   * might lead to unexpected results.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsResponse.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsResponse.java new file mode 100644 index 000000000000..ba24ecd2fb56 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsResponse.java @@ -0,0 +1,1109 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Response message for listing sections.
+ * 
+ * + * Protobuf type {@code google.chat.v1.ListSectionsResponse} + */ +@com.google.protobuf.Generated +public final class ListSectionsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.ListSectionsResponse) + ListSectionsResponseOrBuilder { + 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= */ "", + "ListSectionsResponse"); + } + + // Use ListSectionsResponse.newBuilder() to construct. + private ListSectionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListSectionsResponse() { + sections_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListSectionsResponse.class, + com.google.chat.v1.ListSectionsResponse.Builder.class); + } + + public static final int SECTIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List sections_; + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + @java.lang.Override + public java.util.List getSectionsList() { + return sections_; + } + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + @java.lang.Override + public java.util.List getSectionsOrBuilderList() { + return sections_; + } + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + @java.lang.Override + public int getSectionsCount() { + return sections_.size(); + } + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + @java.lang.Override + public com.google.chat.v1.Section getSections(int index) { + return sections_.get(index); + } + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + @java.lang.Override + public com.google.chat.v1.SectionOrBuilder getSectionsOrBuilder(int index) { + return sections_.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 < sections_.size(); i++) { + output.writeMessage(1, sections_.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 < sections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sections_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.ListSectionsResponse)) { + return super.equals(obj); + } + com.google.chat.v1.ListSectionsResponse other = (com.google.chat.v1.ListSectionsResponse) obj; + + if (!getSectionsList().equals(other.getSectionsList())) 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 (getSectionsCount() > 0) { + hash = (37 * hash) + SECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getSectionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.ListSectionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.ListSectionsResponse 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 listing sections.
+   * 
+ * + * Protobuf type {@code google.chat.v1.ListSectionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.ListSectionsResponse) + com.google.chat.v1.ListSectionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.ListSectionsResponse.class, + com.google.chat.v1.ListSectionsResponse.Builder.class); + } + + // Construct using com.google.chat.v1.ListSectionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (sectionsBuilder_ == null) { + sections_ = java.util.Collections.emptyList(); + } else { + sections_ = null; + sectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_ListSectionsResponse_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.ListSectionsResponse getDefaultInstanceForType() { + return com.google.chat.v1.ListSectionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.ListSectionsResponse build() { + com.google.chat.v1.ListSectionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.ListSectionsResponse buildPartial() { + com.google.chat.v1.ListSectionsResponse result = + new com.google.chat.v1.ListSectionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.chat.v1.ListSectionsResponse result) { + if (sectionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sections_ = java.util.Collections.unmodifiableList(sections_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sections_ = sections_; + } else { + result.sections_ = sectionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.chat.v1.ListSectionsResponse 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.chat.v1.ListSectionsResponse) { + return mergeFrom((com.google.chat.v1.ListSectionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.ListSectionsResponse other) { + if (other == com.google.chat.v1.ListSectionsResponse.getDefaultInstance()) return this; + if (sectionsBuilder_ == null) { + if (!other.sections_.isEmpty()) { + if (sections_.isEmpty()) { + sections_ = other.sections_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSectionsIsMutable(); + sections_.addAll(other.sections_); + } + onChanged(); + } + } else { + if (!other.sections_.isEmpty()) { + if (sectionsBuilder_.isEmpty()) { + sectionsBuilder_.dispose(); + sectionsBuilder_ = null; + sections_ = other.sections_; + bitField0_ = (bitField0_ & ~0x00000001); + sectionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSectionsFieldBuilder() + : null; + } else { + sectionsBuilder_.addAllMessages(other.sections_); + } + } + } + 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.chat.v1.Section m = + input.readMessage(com.google.chat.v1.Section.parser(), extensionRegistry); + if (sectionsBuilder_ == null) { + ensureSectionsIsMutable(); + sections_.add(m); + } else { + sectionsBuilder_.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 sections_ = + java.util.Collections.emptyList(); + + private void ensureSectionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sections_ = new java.util.ArrayList(sections_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder> + sectionsBuilder_; + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public java.util.List getSectionsList() { + if (sectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sections_); + } else { + return sectionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public int getSectionsCount() { + if (sectionsBuilder_ == null) { + return sections_.size(); + } else { + return sectionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public com.google.chat.v1.Section getSections(int index) { + if (sectionsBuilder_ == null) { + return sections_.get(index); + } else { + return sectionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder setSections(int index, com.google.chat.v1.Section value) { + if (sectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSectionsIsMutable(); + sections_.set(index, value); + onChanged(); + } else { + sectionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder setSections(int index, com.google.chat.v1.Section.Builder builderForValue) { + if (sectionsBuilder_ == null) { + ensureSectionsIsMutable(); + sections_.set(index, builderForValue.build()); + onChanged(); + } else { + sectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder addSections(com.google.chat.v1.Section value) { + if (sectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSectionsIsMutable(); + sections_.add(value); + onChanged(); + } else { + sectionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder addSections(int index, com.google.chat.v1.Section value) { + if (sectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSectionsIsMutable(); + sections_.add(index, value); + onChanged(); + } else { + sectionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder addSections(com.google.chat.v1.Section.Builder builderForValue) { + if (sectionsBuilder_ == null) { + ensureSectionsIsMutable(); + sections_.add(builderForValue.build()); + onChanged(); + } else { + sectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder addSections(int index, com.google.chat.v1.Section.Builder builderForValue) { + if (sectionsBuilder_ == null) { + ensureSectionsIsMutable(); + sections_.add(index, builderForValue.build()); + onChanged(); + } else { + sectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder addAllSections(java.lang.Iterable values) { + if (sectionsBuilder_ == null) { + ensureSectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sections_); + onChanged(); + } else { + sectionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder clearSections() { + if (sectionsBuilder_ == null) { + sections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sectionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public Builder removeSections(int index) { + if (sectionsBuilder_ == null) { + ensureSectionsIsMutable(); + sections_.remove(index); + onChanged(); + } else { + sectionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public com.google.chat.v1.Section.Builder getSectionsBuilder(int index) { + return internalGetSectionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public com.google.chat.v1.SectionOrBuilder getSectionsOrBuilder(int index) { + if (sectionsBuilder_ == null) { + return sections_.get(index); + } else { + return sectionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public java.util.List + getSectionsOrBuilderList() { + if (sectionsBuilder_ != null) { + return sectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sections_); + } + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public com.google.chat.v1.Section.Builder addSectionsBuilder() { + return internalGetSectionsFieldBuilder() + .addBuilder(com.google.chat.v1.Section.getDefaultInstance()); + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public com.google.chat.v1.Section.Builder addSectionsBuilder(int index) { + return internalGetSectionsFieldBuilder() + .addBuilder(index, com.google.chat.v1.Section.getDefaultInstance()); + } + + /** + * + * + *
+     * The sections from the specified user.
+     * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + public java.util.List getSectionsBuilderList() { + return internalGetSectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder> + internalGetSectionsFieldBuilder() { + if (sectionsBuilder_ == null) { + sectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder>( + sections_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sections_ = null; + } + return sectionsBuilder_; + } + + 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.chat.v1.ListSectionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.ListSectionsResponse) + private static final com.google.chat.v1.ListSectionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.ListSectionsResponse(); + } + + public static com.google.chat.v1.ListSectionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSectionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.ListSectionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsResponseOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsResponseOrBuilder.java new file mode 100644 index 000000000000..92d09d1f21e5 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ListSectionsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface ListSectionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.ListSectionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + java.util.List getSectionsList(); + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + com.google.chat.v1.Section getSections(int index); + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + int getSectionsCount(); + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + java.util.List getSectionsOrBuilderList(); + + /** + * + * + *
+   * The sections from the specified user.
+   * 
+ * + * repeated .google.chat.v1.Section sections = 1; + */ + com.google.chat.v1.SectionOrBuilder getSectionsOrBuilder(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-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemRequest.java new file mode 100644 index 000000000000..0b72dcdbaea7 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemRequest.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for moving a section item across sections.
+ * 
+ * + * Protobuf type {@code google.chat.v1.MoveSectionItemRequest} + */ +@com.google.protobuf.Generated +public final class MoveSectionItemRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.MoveSectionItemRequest) + MoveSectionItemRequestOrBuilder { + 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= */ "", + "MoveSectionItemRequest"); + } + + // Use MoveSectionItemRequest.newBuilder() to construct. + private MoveSectionItemRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MoveSectionItemRequest() { + name_ = ""; + targetSection_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.MoveSectionItemRequest.class, + com.google.chat.v1.MoveSectionItemRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the section item to move.
+   *
+   * Format: `users/{user}/sections/{section}/items/{item}`
+   * 
+ * + * + * 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 section item to move.
+   *
+   * Format: `users/{user}/sections/{section}/items/{item}`
+   * 
+ * + * + * 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 TARGET_SECTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetSection_ = ""; + + /** + * + * + *
+   * Required. The resource name of the section to move the section item to.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The targetSection. + */ + @java.lang.Override + public java.lang.String getTargetSection() { + java.lang.Object ref = targetSection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetSection_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the section to move the section item to.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetSection. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetSectionBytes() { + java.lang.Object ref = targetSection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetSection_ = 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(targetSection_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, targetSection_); + } + 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(targetSection_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, targetSection_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.MoveSectionItemRequest)) { + return super.equals(obj); + } + com.google.chat.v1.MoveSectionItemRequest other = + (com.google.chat.v1.MoveSectionItemRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTargetSection().equals(other.getTargetSection())) 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) + TARGET_SECTION_FIELD_NUMBER; + hash = (53 * hash) + getTargetSection().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MoveSectionItemRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.MoveSectionItemRequest 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 moving a section item across sections.
+   * 
+ * + * Protobuf type {@code google.chat.v1.MoveSectionItemRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.MoveSectionItemRequest) + com.google.chat.v1.MoveSectionItemRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.MoveSectionItemRequest.class, + com.google.chat.v1.MoveSectionItemRequest.Builder.class); + } + + // Construct using com.google.chat.v1.MoveSectionItemRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + targetSection_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.MoveSectionItemRequest getDefaultInstanceForType() { + return com.google.chat.v1.MoveSectionItemRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.MoveSectionItemRequest build() { + com.google.chat.v1.MoveSectionItemRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.MoveSectionItemRequest buildPartial() { + com.google.chat.v1.MoveSectionItemRequest result = + new com.google.chat.v1.MoveSectionItemRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.MoveSectionItemRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.targetSection_ = targetSection_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.MoveSectionItemRequest) { + return mergeFrom((com.google.chat.v1.MoveSectionItemRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.MoveSectionItemRequest other) { + if (other == com.google.chat.v1.MoveSectionItemRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTargetSection().isEmpty()) { + targetSection_ = other.targetSection_; + 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: + { + targetSection_ = 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. The resource name of the section item to move.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * + * 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 section item to move.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * + * 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 section item to move.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * + * 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 section item to move.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * + * 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 section item to move.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * + * 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 targetSection_ = ""; + + /** + * + * + *
+     * Required. The resource name of the section to move the section item to.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The targetSection. + */ + public java.lang.String getTargetSection() { + java.lang.Object ref = targetSection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetSection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the section to move the section item to.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetSection. + */ + public com.google.protobuf.ByteString getTargetSectionBytes() { + java.lang.Object ref = targetSection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetSection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the section to move the section item to.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The targetSection to set. + * @return This builder for chaining. + */ + public Builder setTargetSection(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetSection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the section to move the section item to.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTargetSection() { + targetSection_ = getDefaultInstance().getTargetSection(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the section to move the section item to.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for targetSection to set. + * @return This builder for chaining. + */ + public Builder setTargetSectionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetSection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.MoveSectionItemRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.MoveSectionItemRequest) + private static final com.google.chat.v1.MoveSectionItemRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.MoveSectionItemRequest(); + } + + public static com.google.chat.v1.MoveSectionItemRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveSectionItemRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.MoveSectionItemRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemRequestOrBuilder.java new file mode 100644 index 000000000000..453c665e8260 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface MoveSectionItemRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.MoveSectionItemRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the section item to move.
+   *
+   * Format: `users/{user}/sections/{section}/items/{item}`
+   * 
+ * + * + * 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 section item to move.
+   *
+   * Format: `users/{user}/sections/{section}/items/{item}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The resource name of the section to move the section item to.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The targetSection. + */ + java.lang.String getTargetSection(); + + /** + * + * + *
+   * Required. The resource name of the section to move the section item to.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * string target_section = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetSection. + */ + com.google.protobuf.ByteString getTargetSectionBytes(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemResponse.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemResponse.java new file mode 100644 index 000000000000..4ac726e8f8a4 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemResponse.java @@ -0,0 +1,698 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Response message for moving a section item.
+ * 
+ * + * Protobuf type {@code google.chat.v1.MoveSectionItemResponse} + */ +@com.google.protobuf.Generated +public final class MoveSectionItemResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.MoveSectionItemResponse) + MoveSectionItemResponseOrBuilder { + 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= */ "", + "MoveSectionItemResponse"); + } + + // Use MoveSectionItemResponse.newBuilder() to construct. + private MoveSectionItemResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MoveSectionItemResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.MoveSectionItemResponse.class, + com.google.chat.v1.MoveSectionItemResponse.Builder.class); + } + + private int bitField0_; + public static final int SECTION_ITEM_FIELD_NUMBER = 1; + private com.google.chat.v1.SectionItem sectionItem_; + + /** + * + * + *
+   * The updated section item.
+   * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + * + * @return Whether the sectionItem field is set. + */ + @java.lang.Override + public boolean hasSectionItem() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The updated section item.
+   * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + * + * @return The sectionItem. + */ + @java.lang.Override + public com.google.chat.v1.SectionItem getSectionItem() { + return sectionItem_ == null + ? com.google.chat.v1.SectionItem.getDefaultInstance() + : sectionItem_; + } + + /** + * + * + *
+   * The updated section item.
+   * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + @java.lang.Override + public com.google.chat.v1.SectionItemOrBuilder getSectionItemOrBuilder() { + return sectionItem_ == null + ? com.google.chat.v1.SectionItem.getDefaultInstance() + : sectionItem_; + } + + 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, getSectionItem()); + } + 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, getSectionItem()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.MoveSectionItemResponse)) { + return super.equals(obj); + } + com.google.chat.v1.MoveSectionItemResponse other = + (com.google.chat.v1.MoveSectionItemResponse) obj; + + if (hasSectionItem() != other.hasSectionItem()) return false; + if (hasSectionItem()) { + if (!getSectionItem().equals(other.getSectionItem())) 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 (hasSectionItem()) { + hash = (37 * hash) + SECTION_ITEM_FIELD_NUMBER; + hash = (53 * hash) + getSectionItem().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.MoveSectionItemResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.MoveSectionItemResponse 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 moving a section item.
+   * 
+ * + * Protobuf type {@code google.chat.v1.MoveSectionItemResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.MoveSectionItemResponse) + com.google.chat.v1.MoveSectionItemResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.MoveSectionItemResponse.class, + com.google.chat.v1.MoveSectionItemResponse.Builder.class); + } + + // Construct using com.google.chat.v1.MoveSectionItemResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSectionItemFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sectionItem_ = null; + if (sectionItemBuilder_ != null) { + sectionItemBuilder_.dispose(); + sectionItemBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_MoveSectionItemResponse_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.MoveSectionItemResponse getDefaultInstanceForType() { + return com.google.chat.v1.MoveSectionItemResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.MoveSectionItemResponse build() { + com.google.chat.v1.MoveSectionItemResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.MoveSectionItemResponse buildPartial() { + com.google.chat.v1.MoveSectionItemResponse result = + new com.google.chat.v1.MoveSectionItemResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.MoveSectionItemResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sectionItem_ = + sectionItemBuilder_ == null ? sectionItem_ : sectionItemBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.MoveSectionItemResponse) { + return mergeFrom((com.google.chat.v1.MoveSectionItemResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.MoveSectionItemResponse other) { + if (other == com.google.chat.v1.MoveSectionItemResponse.getDefaultInstance()) return this; + if (other.hasSectionItem()) { + mergeSectionItem(other.getSectionItem()); + } + 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( + internalGetSectionItemFieldBuilder().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.chat.v1.SectionItem sectionItem_; + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.SectionItem, + com.google.chat.v1.SectionItem.Builder, + com.google.chat.v1.SectionItemOrBuilder> + sectionItemBuilder_; + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + * + * @return Whether the sectionItem field is set. + */ + public boolean hasSectionItem() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + * + * @return The sectionItem. + */ + public com.google.chat.v1.SectionItem getSectionItem() { + if (sectionItemBuilder_ == null) { + return sectionItem_ == null + ? com.google.chat.v1.SectionItem.getDefaultInstance() + : sectionItem_; + } else { + return sectionItemBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + public Builder setSectionItem(com.google.chat.v1.SectionItem value) { + if (sectionItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sectionItem_ = value; + } else { + sectionItemBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + public Builder setSectionItem(com.google.chat.v1.SectionItem.Builder builderForValue) { + if (sectionItemBuilder_ == null) { + sectionItem_ = builderForValue.build(); + } else { + sectionItemBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + public Builder mergeSectionItem(com.google.chat.v1.SectionItem value) { + if (sectionItemBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sectionItem_ != null + && sectionItem_ != com.google.chat.v1.SectionItem.getDefaultInstance()) { + getSectionItemBuilder().mergeFrom(value); + } else { + sectionItem_ = value; + } + } else { + sectionItemBuilder_.mergeFrom(value); + } + if (sectionItem_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + public Builder clearSectionItem() { + bitField0_ = (bitField0_ & ~0x00000001); + sectionItem_ = null; + if (sectionItemBuilder_ != null) { + sectionItemBuilder_.dispose(); + sectionItemBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + public com.google.chat.v1.SectionItem.Builder getSectionItemBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSectionItemFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + public com.google.chat.v1.SectionItemOrBuilder getSectionItemOrBuilder() { + if (sectionItemBuilder_ != null) { + return sectionItemBuilder_.getMessageOrBuilder(); + } else { + return sectionItem_ == null + ? com.google.chat.v1.SectionItem.getDefaultInstance() + : sectionItem_; + } + } + + /** + * + * + *
+     * The updated section item.
+     * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.SectionItem, + com.google.chat.v1.SectionItem.Builder, + com.google.chat.v1.SectionItemOrBuilder> + internalGetSectionItemFieldBuilder() { + if (sectionItemBuilder_ == null) { + sectionItemBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.SectionItem, + com.google.chat.v1.SectionItem.Builder, + com.google.chat.v1.SectionItemOrBuilder>( + getSectionItem(), getParentForChildren(), isClean()); + sectionItem_ = null; + } + return sectionItemBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.MoveSectionItemResponse) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.MoveSectionItemResponse) + private static final com.google.chat.v1.MoveSectionItemResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.MoveSectionItemResponse(); + } + + public static com.google.chat.v1.MoveSectionItemResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveSectionItemResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.MoveSectionItemResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemResponseOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemResponseOrBuilder.java new file mode 100644 index 000000000000..0e952311dacb --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MoveSectionItemResponseOrBuilder.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/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface MoveSectionItemResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.MoveSectionItemResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The updated section item.
+   * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + * + * @return Whether the sectionItem field is set. + */ + boolean hasSectionItem(); + + /** + * + * + *
+   * The updated section item.
+   * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + * + * @return The sectionItem. + */ + com.google.chat.v1.SectionItem getSectionItem(); + + /** + * + * + *
+   * The updated section item.
+   * 
+ * + * .google.chat.v1.SectionItem section_item = 1; + */ + com.google.chat.v1.SectionItemOrBuilder getSectionItemOrBuilder(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionRequest.java new file mode 100644 index 000000000000..bda64922a461 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionRequest.java @@ -0,0 +1,1267 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for positioning a section.
+ * 
+ * + * Protobuf type {@code google.chat.v1.PositionSectionRequest} + */ +@com.google.protobuf.Generated +public final class PositionSectionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.PositionSectionRequest) + PositionSectionRequestOrBuilder { + 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= */ "", + "PositionSectionRequest"); + } + + // Use PositionSectionRequest.newBuilder() to construct. + private PositionSectionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PositionSectionRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.PositionSectionRequest.class, + com.google.chat.v1.PositionSectionRequest.Builder.class); + } + + /** + * + * + *
+   * The position of the section.
+   * 
+ * + * Protobuf enum {@code google.chat.v1.PositionSectionRequest.Position} + */ + public enum Position implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified position.
+     * 
+ * + * POSITION_UNSPECIFIED = 0; + */ + POSITION_UNSPECIFIED(0), + /** + * + * + *
+     * Start of the list of sections.
+     * 
+ * + * START = 1; + */ + START(1), + /** + * + * + *
+     * End of the list of sections.
+     * 
+ * + * END = 2; + */ + END(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Position"); + } + + /** + * + * + *
+     * Unspecified position.
+     * 
+ * + * POSITION_UNSPECIFIED = 0; + */ + public static final int POSITION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Start of the list of sections.
+     * 
+ * + * START = 1; + */ + public static final int START_VALUE = 1; + + /** + * + * + *
+     * End of the list of sections.
+     * 
+ * + * END = 2; + */ + public static final int END_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 Position 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 Position forNumber(int value) { + switch (value) { + case 0: + return POSITION_UNSPECIFIED; + case 1: + return START; + case 2: + return END; + 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 Position findValueByNumber(int number) { + return Position.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.chat.v1.PositionSectionRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final Position[] VALUES = values(); + + public static Position 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 Position(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.chat.v1.PositionSectionRequest.Position) + } + + private int positionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object position_; + + public enum PositionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SORT_ORDER(2), + RELATIVE_POSITION(3), + POSITION_NOT_SET(0); + private final int value; + + private PositionCase(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 PositionCase valueOf(int value) { + return forNumber(value); + } + + public static PositionCase forNumber(int value) { + switch (value) { + case 2: + return SORT_ORDER; + case 3: + return RELATIVE_POSITION; + case 0: + return POSITION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PositionCase getPositionCase() { + return PositionCase.forNumber(positionCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the section to position.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * 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 section to position.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * 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 SORT_ORDER_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Optional. The absolute position of the section in the list of sections.
+   * The position must be greater than 0. If the position is greater than the
+   * number of sections, the section will be appended to the end of the list.
+   * This operation inserts the section at the given position and shifts the
+   * original section at that position, and those below it, to the next
+   * position.
+   * 
+ * + * int32 sort_order = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sortOrder field is set. + */ + @java.lang.Override + public boolean hasSortOrder() { + return positionCase_ == 2; + } + + /** + * + * + *
+   * Optional. The absolute position of the section in the list of sections.
+   * The position must be greater than 0. If the position is greater than the
+   * number of sections, the section will be appended to the end of the list.
+   * This operation inserts the section at the given position and shifts the
+   * original section at that position, and those below it, to the next
+   * position.
+   * 
+ * + * int32 sort_order = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sortOrder. + */ + @java.lang.Override + public int getSortOrder() { + if (positionCase_ == 2) { + return (java.lang.Integer) position_; + } + return 0; + } + + public static final int RELATIVE_POSITION_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Optional. The relative position of the section in the list of sections.
+   * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the relativePosition field is set. + */ + public boolean hasRelativePosition() { + return positionCase_ == 3; + } + + /** + * + * + *
+   * Optional. The relative position of the section in the list of sections.
+   * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for relativePosition. + */ + public int getRelativePositionValue() { + if (positionCase_ == 3) { + return (java.lang.Integer) position_; + } + return 0; + } + + /** + * + * + *
+   * Optional. The relative position of the section in the list of sections.
+   * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relativePosition. + */ + public com.google.chat.v1.PositionSectionRequest.Position getRelativePosition() { + if (positionCase_ == 3) { + com.google.chat.v1.PositionSectionRequest.Position result = + com.google.chat.v1.PositionSectionRequest.Position.forNumber( + (java.lang.Integer) position_); + return result == null + ? com.google.chat.v1.PositionSectionRequest.Position.UNRECOGNIZED + : result; + } + return com.google.chat.v1.PositionSectionRequest.Position.POSITION_UNSPECIFIED; + } + + 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 (positionCase_ == 2) { + output.writeInt32(2, (int) ((java.lang.Integer) position_)); + } + if (positionCase_ == 3) { + output.writeEnum(3, ((java.lang.Integer) position_)); + } + 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 (positionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, (int) ((java.lang.Integer) position_)); + } + if (positionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(3, ((java.lang.Integer) position_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.PositionSectionRequest)) { + return super.equals(obj); + } + com.google.chat.v1.PositionSectionRequest other = + (com.google.chat.v1.PositionSectionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPositionCase().equals(other.getPositionCase())) return false; + switch (positionCase_) { + case 2: + if (getSortOrder() != other.getSortOrder()) return false; + break; + case 3: + if (getRelativePositionValue() != other.getRelativePositionValue()) 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(); + switch (positionCase_) { + case 2: + hash = (37 * hash) + SORT_ORDER_FIELD_NUMBER; + hash = (53 * hash) + getSortOrder(); + break; + case 3: + hash = (37 * hash) + RELATIVE_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getRelativePositionValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.PositionSectionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.PositionSectionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.PositionSectionRequest 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 positioning a section.
+   * 
+ * + * Protobuf type {@code google.chat.v1.PositionSectionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.PositionSectionRequest) + com.google.chat.v1.PositionSectionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.PositionSectionRequest.class, + com.google.chat.v1.PositionSectionRequest.Builder.class); + } + + // Construct using com.google.chat.v1.PositionSectionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + positionCase_ = 0; + position_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.PositionSectionRequest getDefaultInstanceForType() { + return com.google.chat.v1.PositionSectionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.PositionSectionRequest build() { + com.google.chat.v1.PositionSectionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.PositionSectionRequest buildPartial() { + com.google.chat.v1.PositionSectionRequest result = + new com.google.chat.v1.PositionSectionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.PositionSectionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs(com.google.chat.v1.PositionSectionRequest result) { + result.positionCase_ = positionCase_; + result.position_ = this.position_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.PositionSectionRequest) { + return mergeFrom((com.google.chat.v1.PositionSectionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.PositionSectionRequest other) { + if (other == com.google.chat.v1.PositionSectionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getPositionCase()) { + case SORT_ORDER: + { + setSortOrder(other.getSortOrder()); + break; + } + case RELATIVE_POSITION: + { + setRelativePositionValue(other.getRelativePositionValue()); + break; + } + case POSITION_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_ |= 0x00000001; + break; + } // case 10 + case 16: + { + position_ = input.readInt32(); + positionCase_ = 2; + break; + } // case 16 + case 24: + { + int rawValue = input.readEnum(); + positionCase_ = 3; + position_ = rawValue; + 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 positionCase_ = 0; + private java.lang.Object position_; + + public PositionCase getPositionCase() { + return PositionCase.forNumber(positionCase_); + } + + public Builder clearPosition() { + positionCase_ = 0; + position_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the section to position.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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 section to position.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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 section to position.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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 section to position.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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 section to position.
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * + * 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; + } + + /** + * + * + *
+     * Optional. The absolute position of the section in the list of sections.
+     * The position must be greater than 0. If the position is greater than the
+     * number of sections, the section will be appended to the end of the list.
+     * This operation inserts the section at the given position and shifts the
+     * original section at that position, and those below it, to the next
+     * position.
+     * 
+ * + * int32 sort_order = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sortOrder field is set. + */ + public boolean hasSortOrder() { + return positionCase_ == 2; + } + + /** + * + * + *
+     * Optional. The absolute position of the section in the list of sections.
+     * The position must be greater than 0. If the position is greater than the
+     * number of sections, the section will be appended to the end of the list.
+     * This operation inserts the section at the given position and shifts the
+     * original section at that position, and those below it, to the next
+     * position.
+     * 
+ * + * int32 sort_order = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sortOrder. + */ + public int getSortOrder() { + if (positionCase_ == 2) { + return (java.lang.Integer) position_; + } + return 0; + } + + /** + * + * + *
+     * Optional. The absolute position of the section in the list of sections.
+     * The position must be greater than 0. If the position is greater than the
+     * number of sections, the section will be appended to the end of the list.
+     * This operation inserts the section at the given position and shifts the
+     * original section at that position, and those below it, to the next
+     * position.
+     * 
+ * + * int32 sort_order = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sortOrder to set. + * @return This builder for chaining. + */ + public Builder setSortOrder(int value) { + + positionCase_ = 2; + position_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The absolute position of the section in the list of sections.
+     * The position must be greater than 0. If the position is greater than the
+     * number of sections, the section will be appended to the end of the list.
+     * This operation inserts the section at the given position and shifts the
+     * original section at that position, and those below it, to the next
+     * position.
+     * 
+ * + * int32 sort_order = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSortOrder() { + if (positionCase_ == 2) { + positionCase_ = 0; + position_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The relative position of the section in the list of sections.
+     * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the relativePosition field is set. + */ + @java.lang.Override + public boolean hasRelativePosition() { + return positionCase_ == 3; + } + + /** + * + * + *
+     * Optional. The relative position of the section in the list of sections.
+     * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for relativePosition. + */ + @java.lang.Override + public int getRelativePositionValue() { + if (positionCase_ == 3) { + return ((java.lang.Integer) position_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Optional. The relative position of the section in the list of sections.
+     * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for relativePosition to set. + * @return This builder for chaining. + */ + public Builder setRelativePositionValue(int value) { + positionCase_ = 3; + position_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The relative position of the section in the list of sections.
+     * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relativePosition. + */ + @java.lang.Override + public com.google.chat.v1.PositionSectionRequest.Position getRelativePosition() { + if (positionCase_ == 3) { + com.google.chat.v1.PositionSectionRequest.Position result = + com.google.chat.v1.PositionSectionRequest.Position.forNumber( + (java.lang.Integer) position_); + return result == null + ? com.google.chat.v1.PositionSectionRequest.Position.UNRECOGNIZED + : result; + } + return com.google.chat.v1.PositionSectionRequest.Position.POSITION_UNSPECIFIED; + } + + /** + * + * + *
+     * Optional. The relative position of the section in the list of sections.
+     * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The relativePosition to set. + * @return This builder for chaining. + */ + public Builder setRelativePosition(com.google.chat.v1.PositionSectionRequest.Position value) { + if (value == null) { + throw new NullPointerException(); + } + positionCase_ = 3; + position_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The relative position of the section in the list of sections.
+     * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRelativePosition() { + if (positionCase_ == 3) { + positionCase_ = 0; + position_ = null; + onChanged(); + } + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.PositionSectionRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.PositionSectionRequest) + private static final com.google.chat.v1.PositionSectionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.PositionSectionRequest(); + } + + public static com.google.chat.v1.PositionSectionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PositionSectionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.PositionSectionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionRequestOrBuilder.java new file mode 100644 index 000000000000..10b8fafb19c6 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionRequestOrBuilder.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/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface PositionSectionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.PositionSectionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the section to position.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * 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 section to position.
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The absolute position of the section in the list of sections.
+   * The position must be greater than 0. If the position is greater than the
+   * number of sections, the section will be appended to the end of the list.
+   * This operation inserts the section at the given position and shifts the
+   * original section at that position, and those below it, to the next
+   * position.
+   * 
+ * + * int32 sort_order = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the sortOrder field is set. + */ + boolean hasSortOrder(); + + /** + * + * + *
+   * Optional. The absolute position of the section in the list of sections.
+   * The position must be greater than 0. If the position is greater than the
+   * number of sections, the section will be appended to the end of the list.
+   * This operation inserts the section at the given position and shifts the
+   * original section at that position, and those below it, to the next
+   * position.
+   * 
+ * + * int32 sort_order = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sortOrder. + */ + int getSortOrder(); + + /** + * + * + *
+   * Optional. The relative position of the section in the list of sections.
+   * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the relativePosition field is set. + */ + boolean hasRelativePosition(); + + /** + * + * + *
+   * Optional. The relative position of the section in the list of sections.
+   * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for relativePosition. + */ + int getRelativePositionValue(); + + /** + * + * + *
+   * Optional. The relative position of the section in the list of sections.
+   * 
+ * + * + * .google.chat.v1.PositionSectionRequest.Position relative_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relativePosition. + */ + com.google.chat.v1.PositionSectionRequest.Position getRelativePosition(); + + com.google.chat.v1.PositionSectionRequest.PositionCase getPositionCase(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionResponse.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionResponse.java new file mode 100644 index 000000000000..68aabd0e3a83 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionResponse.java @@ -0,0 +1,688 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Response message for positioning a section.
+ * 
+ * + * Protobuf type {@code google.chat.v1.PositionSectionResponse} + */ +@com.google.protobuf.Generated +public final class PositionSectionResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.PositionSectionResponse) + PositionSectionResponseOrBuilder { + 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= */ "", + "PositionSectionResponse"); + } + + // Use PositionSectionResponse.newBuilder() to construct. + private PositionSectionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PositionSectionResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.PositionSectionResponse.class, + com.google.chat.v1.PositionSectionResponse.Builder.class); + } + + private int bitField0_; + public static final int SECTION_FIELD_NUMBER = 1; + private com.google.chat.v1.Section section_; + + /** + * + * + *
+   * The updated section.
+   * 
+ * + * .google.chat.v1.Section section = 1; + * + * @return Whether the section field is set. + */ + @java.lang.Override + public boolean hasSection() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The updated section.
+   * 
+ * + * .google.chat.v1.Section section = 1; + * + * @return The section. + */ + @java.lang.Override + public com.google.chat.v1.Section getSection() { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + + /** + * + * + *
+   * The updated section.
+   * 
+ * + * .google.chat.v1.Section section = 1; + */ + @java.lang.Override + public com.google.chat.v1.SectionOrBuilder getSectionOrBuilder() { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + + 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, getSection()); + } + 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, getSection()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.PositionSectionResponse)) { + return super.equals(obj); + } + com.google.chat.v1.PositionSectionResponse other = + (com.google.chat.v1.PositionSectionResponse) obj; + + if (hasSection() != other.hasSection()) return false; + if (hasSection()) { + if (!getSection().equals(other.getSection())) 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 (hasSection()) { + hash = (37 * hash) + SECTION_FIELD_NUMBER; + hash = (53 * hash) + getSection().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.PositionSectionResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.PositionSectionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.PositionSectionResponse 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 positioning a section.
+   * 
+ * + * Protobuf type {@code google.chat.v1.PositionSectionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.PositionSectionResponse) + com.google.chat.v1.PositionSectionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.PositionSectionResponse.class, + com.google.chat.v1.PositionSectionResponse.Builder.class); + } + + // Construct using com.google.chat.v1.PositionSectionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSectionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + section_ = null; + if (sectionBuilder_ != null) { + sectionBuilder_.dispose(); + sectionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_PositionSectionResponse_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.PositionSectionResponse getDefaultInstanceForType() { + return com.google.chat.v1.PositionSectionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.PositionSectionResponse build() { + com.google.chat.v1.PositionSectionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.PositionSectionResponse buildPartial() { + com.google.chat.v1.PositionSectionResponse result = + new com.google.chat.v1.PositionSectionResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.PositionSectionResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.section_ = sectionBuilder_ == null ? section_ : sectionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.PositionSectionResponse) { + return mergeFrom((com.google.chat.v1.PositionSectionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.PositionSectionResponse other) { + if (other == com.google.chat.v1.PositionSectionResponse.getDefaultInstance()) return this; + if (other.hasSection()) { + mergeSection(other.getSection()); + } + 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(internalGetSectionFieldBuilder().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.chat.v1.Section section_; + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder> + sectionBuilder_; + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + * + * @return Whether the section field is set. + */ + public boolean hasSection() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + * + * @return The section. + */ + public com.google.chat.v1.Section getSection() { + if (sectionBuilder_ == null) { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } else { + return sectionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + */ + public Builder setSection(com.google.chat.v1.Section value) { + if (sectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + section_ = value; + } else { + sectionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + */ + public Builder setSection(com.google.chat.v1.Section.Builder builderForValue) { + if (sectionBuilder_ == null) { + section_ = builderForValue.build(); + } else { + sectionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + */ + public Builder mergeSection(com.google.chat.v1.Section value) { + if (sectionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && section_ != null + && section_ != com.google.chat.v1.Section.getDefaultInstance()) { + getSectionBuilder().mergeFrom(value); + } else { + section_ = value; + } + } else { + sectionBuilder_.mergeFrom(value); + } + if (section_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + */ + public Builder clearSection() { + bitField0_ = (bitField0_ & ~0x00000001); + section_ = null; + if (sectionBuilder_ != null) { + sectionBuilder_.dispose(); + sectionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + */ + public com.google.chat.v1.Section.Builder getSectionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSectionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + */ + public com.google.chat.v1.SectionOrBuilder getSectionOrBuilder() { + if (sectionBuilder_ != null) { + return sectionBuilder_.getMessageOrBuilder(); + } else { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + } + + /** + * + * + *
+     * The updated section.
+     * 
+ * + * .google.chat.v1.Section section = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder> + internalGetSectionFieldBuilder() { + if (sectionBuilder_ == null) { + sectionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder>( + getSection(), getParentForChildren(), isClean()); + section_ = null; + } + return sectionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.PositionSectionResponse) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.PositionSectionResponse) + private static final com.google.chat.v1.PositionSectionResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.PositionSectionResponse(); + } + + public static com.google.chat.v1.PositionSectionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PositionSectionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.PositionSectionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionResponseOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionResponseOrBuilder.java new file mode 100644 index 000000000000..8aa5292eee4f --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/PositionSectionResponseOrBuilder.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/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface PositionSectionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.PositionSectionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The updated section.
+   * 
+ * + * .google.chat.v1.Section section = 1; + * + * @return Whether the section field is set. + */ + boolean hasSection(); + + /** + * + * + *
+   * The updated section.
+   * 
+ * + * .google.chat.v1.Section section = 1; + * + * @return The section. + */ + com.google.chat.v1.Section getSection(); + + /** + * + * + *
+   * The updated section.
+   * 
+ * + * .google.chat.v1.Section section = 1; + */ + com.google.chat.v1.SectionOrBuilder getSectionOrBuilder(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Section.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Section.java new file mode 100644 index 000000000000..8d95fb8b6161 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Section.java @@ -0,0 +1,1365 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Represents a [section](https://support.google.com/chat/answer/16059854) in
+ * Google Chat. Sections help users organize their spaces. There are two types
+ * of sections:
+ *
+ * 1.  **System Sections:** These are predefined sections managed by Google
+ * Chat.
+ * Their resource names are fixed, and they cannot be created, deleted, or
+ * have their `display_name` modified. Examples include:
+ * *   `users/{user}/sections/default-direct-messages`
+ * *   `users/{user}/sections/default-spaces`
+ * *   `users/{user}/sections/default-apps`
+ *
+ * 2.  **Custom Sections:** These are sections created and managed by the user.
+ * Creating a custom section using `CreateSection` **requires** a
+ * `display_name`. Custom sections can be updated using `UpdateSection` and
+ * deleted using `DeleteSection`.
+ * 
+ * + * Protobuf type {@code google.chat.v1.Section} + */ +@com.google.protobuf.Generated +public final class Section extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.Section) + SectionOrBuilder { + 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= */ "", + "Section"); + } + + // Use Section.newBuilder() to construct. + private Section(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Section() { + name_ = ""; + displayName_ = ""; + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto.internal_static_google_chat_v1_Section_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto.internal_static_google_chat_v1_Section_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.Section.class, com.google.chat.v1.Section.Builder.class); + } + + /** + * + * + *
+   * Section types.
+   * 
+ * + * Protobuf enum {@code google.chat.v1.Section.SectionType} + */ + public enum SectionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified section type.
+     * 
+ * + * SECTION_TYPE_UNSPECIFIED = 0; + */ + SECTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Custom section.
+     * 
+ * + * CUSTOM_SECTION = 1; + */ + CUSTOM_SECTION(1), + /** + * + * + *
+     * Default section containing
+     * [DIRECT_MESSAGE](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)
+     * between two human users or
+     * [GROUP_CHAT](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)
+     * spaces that don't belong to any custom section.
+     * 
+ * + * DEFAULT_DIRECT_MESSAGES = 2; + */ + DEFAULT_DIRECT_MESSAGES(2), + /** + * + * + *
+     * Default spaces that don't belong to any custom section.
+     * 
+ * + * DEFAULT_SPACES = 3; + */ + DEFAULT_SPACES(3), + /** + * + * + *
+     * Default section containing a user's installed apps.
+     * 
+ * + * DEFAULT_APPS = 6; + */ + DEFAULT_APPS(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SectionType"); + } + + /** + * + * + *
+     * Unspecified section type.
+     * 
+ * + * SECTION_TYPE_UNSPECIFIED = 0; + */ + public static final int SECTION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Custom section.
+     * 
+ * + * CUSTOM_SECTION = 1; + */ + public static final int CUSTOM_SECTION_VALUE = 1; + + /** + * + * + *
+     * Default section containing
+     * [DIRECT_MESSAGE](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)
+     * between two human users or
+     * [GROUP_CHAT](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)
+     * spaces that don't belong to any custom section.
+     * 
+ * + * DEFAULT_DIRECT_MESSAGES = 2; + */ + public static final int DEFAULT_DIRECT_MESSAGES_VALUE = 2; + + /** + * + * + *
+     * Default spaces that don't belong to any custom section.
+     * 
+ * + * DEFAULT_SPACES = 3; + */ + public static final int DEFAULT_SPACES_VALUE = 3; + + /** + * + * + *
+     * Default section containing a user's installed apps.
+     * 
+ * + * DEFAULT_APPS = 6; + */ + public static final int DEFAULT_APPS_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 SectionType 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 SectionType forNumber(int value) { + switch (value) { + case 0: + return SECTION_TYPE_UNSPECIFIED; + case 1: + return CUSTOM_SECTION; + case 2: + return DEFAULT_DIRECT_MESSAGES; + case 3: + return DEFAULT_SPACES; + case 6: + return DEFAULT_APPS; + 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 SectionType findValueByNumber(int number) { + return SectionType.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.chat.v1.Section.getDescriptor().getEnumTypes().get(0); + } + + private static final SectionType[] VALUES = values(); + + public static SectionType 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 SectionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.chat.v1.Section.SectionType) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Resource name of the section.
+   *
+   * For system sections, the section ID is a constant string:
+   *
+   * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+   * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+   * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * 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. Resource name of the section.
+   *
+   * For system sections, the section ID is a constant string:
+   *
+   * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+   * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+   * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * 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 DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. The section's display name. Only populated for sections of type
+   * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+   * `CUSTOM_SECTION`.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The section's display name. Only populated for sections of type
+   * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+   * `CUSTOM_SECTION`.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 SORT_ORDER_FIELD_NUMBER = 3; + private int sortOrder_ = 0; + + /** + * + * + *
+   * Output only. The order of the section in relation to other sections.
+   * Sections with a lower `sort_order` value appear before sections with a
+   * higher value.
+   * 
+ * + * int32 sort_order = 3; + * + * @return The sortOrder. + */ + @java.lang.Override + public int getSortOrder() { + return sortOrder_; + } + + public static final int TYPE_FIELD_NUMBER = 4; + private int type_ = 0; + + /** + * + * + *
+   * Required. The type of the section.
+   * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Required. The type of the section.
+   * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.chat.v1.Section.SectionType getType() { + com.google.chat.v1.Section.SectionType result = + com.google.chat.v1.Section.SectionType.forNumber(type_); + return result == null ? com.google.chat.v1.Section.SectionType.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(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (sortOrder_ != 0) { + output.writeInt32(3, sortOrder_); + } + if (type_ != com.google.chat.v1.Section.SectionType.SECTION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, type_); + } + 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 (sortOrder_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, sortOrder_); + } + if (type_ != com.google.chat.v1.Section.SectionType.SECTION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.Section)) { + return super.equals(obj); + } + com.google.chat.v1.Section other = (com.google.chat.v1.Section) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (getSortOrder() != other.getSortOrder()) return false; + if (type_ != other.type_) 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) + SORT_ORDER_FIELD_NUMBER; + hash = (53 * hash) + getSortOrder(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.Section parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.Section parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.Section parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.Section parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.Section parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.Section parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.Section parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.Section parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.Section parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.Section parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.Section parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.Section parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.Section 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 [section](https://support.google.com/chat/answer/16059854) in
+   * Google Chat. Sections help users organize their spaces. There are two types
+   * of sections:
+   *
+   * 1.  **System Sections:** These are predefined sections managed by Google
+   * Chat.
+   * Their resource names are fixed, and they cannot be created, deleted, or
+   * have their `display_name` modified. Examples include:
+   * *   `users/{user}/sections/default-direct-messages`
+   * *   `users/{user}/sections/default-spaces`
+   * *   `users/{user}/sections/default-apps`
+   *
+   * 2.  **Custom Sections:** These are sections created and managed by the user.
+   * Creating a custom section using `CreateSection` **requires** a
+   * `display_name`. Custom sections can be updated using `UpdateSection` and
+   * deleted using `DeleteSection`.
+   * 
+ * + * Protobuf type {@code google.chat.v1.Section} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.Section) + com.google.chat.v1.SectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto.internal_static_google_chat_v1_Section_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_Section_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.Section.class, com.google.chat.v1.Section.Builder.class); + } + + // Construct using com.google.chat.v1.Section.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_ = ""; + sortOrder_ = 0; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto.internal_static_google_chat_v1_Section_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.Section getDefaultInstanceForType() { + return com.google.chat.v1.Section.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.Section build() { + com.google.chat.v1.Section result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.Section buildPartial() { + com.google.chat.v1.Section result = new com.google.chat.v1.Section(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.Section 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.sortOrder_ = sortOrder_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.Section) { + return mergeFrom((com.google.chat.v1.Section) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.Section other) { + if (other == com.google.chat.v1.Section.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.getSortOrder() != 0) { + setSortOrder(other.getSortOrder()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + 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 24: + { + sortOrder_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + type_ = input.readEnum(); + 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 name_ = ""; + + /** + * + * + *
+     * Identifier. Resource name of the section.
+     *
+     * For system sections, the section ID is a constant string:
+     *
+     * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+     * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+     * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * 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. Resource name of the section.
+     *
+     * For system sections, the section ID is a constant string:
+     *
+     * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+     * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+     * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * 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. Resource name of the section.
+     *
+     * For system sections, the section ID is a constant string:
+     *
+     * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+     * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+     * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * 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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Resource name of the section.
+     *
+     * For system sections, the section ID is a constant string:
+     *
+     * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+     * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+     * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Resource name of the section.
+     *
+     * For system sections, the section ID is a constant string:
+     *
+     * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+     * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+     * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+     *
+     * Format: `users/{user}/sections/{section}`
+     * 
+ * + * 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_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. The section's display name. Only populated for sections of type
+     * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+     * `CUSTOM_SECTION`.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The section's display name. Only populated for sections of type
+     * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+     * `CUSTOM_SECTION`.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The section's display name. Only populated for sections of type
+     * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+     * `CUSTOM_SECTION`.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. The section's display name. Only populated for sections of type
+     * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+     * `CUSTOM_SECTION`.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The section's display name. Only populated for sections of type
+     * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+     * `CUSTOM_SECTION`.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 int sortOrder_; + + /** + * + * + *
+     * Output only. The order of the section in relation to other sections.
+     * Sections with a lower `sort_order` value appear before sections with a
+     * higher value.
+     * 
+ * + * int32 sort_order = 3; + * + * @return The sortOrder. + */ + @java.lang.Override + public int getSortOrder() { + return sortOrder_; + } + + /** + * + * + *
+     * Output only. The order of the section in relation to other sections.
+     * Sections with a lower `sort_order` value appear before sections with a
+     * higher value.
+     * 
+ * + * int32 sort_order = 3; + * + * @param value The sortOrder to set. + * @return This builder for chaining. + */ + public Builder setSortOrder(int value) { + + sortOrder_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The order of the section in relation to other sections.
+     * Sections with a lower `sort_order` value appear before sections with a
+     * higher value.
+     * 
+ * + * int32 sort_order = 3; + * + * @return This builder for chaining. + */ + public Builder clearSortOrder() { + bitField0_ = (bitField0_ & ~0x00000004); + sortOrder_ = 0; + onChanged(); + return this; + } + + private int type_ = 0; + + /** + * + * + *
+     * Required. The type of the section.
+     * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Required. The type of the section.
+     * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the section.
+     * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.chat.v1.Section.SectionType getType() { + com.google.chat.v1.Section.SectionType result = + com.google.chat.v1.Section.SectionType.forNumber(type_); + return result == null ? com.google.chat.v1.Section.SectionType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. The type of the section.
+     * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.chat.v1.Section.SectionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the section.
+     * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.Section) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.Section) + private static final com.google.chat.v1.Section DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.Section(); + } + + public static com.google.chat.v1.Section getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser
PARSER = + new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Section parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.Section getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItem.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItem.java new file mode 100644 index 000000000000..395b1663fd72 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItem.java @@ -0,0 +1,962 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * A user's defined section item. This is used to represent section items, such
+ * as spaces, grouped under a section.
+ * 
+ * + * Protobuf type {@code google.chat.v1.SectionItem} + */ +@com.google.protobuf.Generated +public final class SectionItem extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.SectionItem) + SectionItemOrBuilder { + 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= */ "", + "SectionItem"); + } + + // Use SectionItem.newBuilder() to construct. + private SectionItem(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SectionItem() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto.internal_static_google_chat_v1_SectionItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_SectionItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.SectionItem.class, com.google.chat.v1.SectionItem.Builder.class); + } + + private int itemCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object item_; + + public enum ItemCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SPACE(2), + ITEM_NOT_SET(0); + private final int value; + + private ItemCase(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 ItemCase valueOf(int value) { + return forNumber(value); + } + + public static ItemCase forNumber(int value) { + switch (value) { + case 2: + return SPACE; + case 0: + return ITEM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ItemCase getItemCase() { + return ItemCase.forNumber(itemCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the section item.
+   *
+   * Format: `users/{user}/sections/{section}/items/{item}`
+   * 
+ * + * 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. The resource name of the section item.
+   *
+   * Format: `users/{user}/sections/{section}/items/{item}`
+   * 
+ * + * 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 SPACE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Optional. The space resource name.
+   *
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the space field is set. + */ + public boolean hasSpace() { + return itemCase_ == 2; + } + + /** + * + * + *
+   * Optional. The space resource name.
+   *
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The space. + */ + public java.lang.String getSpace() { + java.lang.Object ref = ""; + if (itemCase_ == 2) { + ref = item_; + } + if (ref instanceof java.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 (itemCase_ == 2) { + item_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The space resource name.
+   *
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for space. + */ + public com.google.protobuf.ByteString getSpaceBytes() { + java.lang.Object ref = ""; + if (itemCase_ == 2) { + ref = item_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (itemCase_ == 2) { + item_ = 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 (itemCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, item_); + } + 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 (itemCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, item_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.chat.v1.SectionItem)) { + return super.equals(obj); + } + com.google.chat.v1.SectionItem other = (com.google.chat.v1.SectionItem) obj; + + if (!getName().equals(other.getName())) return false; + if (!getItemCase().equals(other.getItemCase())) return false; + switch (itemCase_) { + case 2: + if (!getSpace().equals(other.getSpace())) 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(); + switch (itemCase_) { + case 2: + hash = (37 * hash) + SPACE_FIELD_NUMBER; + hash = (53 * hash) + getSpace().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.chat.v1.SectionItem parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.SectionItem parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.SectionItem parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.SectionItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.SectionItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.SectionItem parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.SectionItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.SectionItem parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.SectionItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.SectionItem parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.SectionItem parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.SectionItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.SectionItem 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 user's defined section item. This is used to represent section items, such
+   * as spaces, grouped under a section.
+   * 
+ * + * Protobuf type {@code google.chat.v1.SectionItem} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.SectionItem) + com.google.chat.v1.SectionItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto.internal_static_google_chat_v1_SectionItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_SectionItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.SectionItem.class, com.google.chat.v1.SectionItem.Builder.class); + } + + // Construct using com.google.chat.v1.SectionItem.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + itemCase_ = 0; + item_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.chat.v1.SectionProto.internal_static_google_chat_v1_SectionItem_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.SectionItem getDefaultInstanceForType() { + return com.google.chat.v1.SectionItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.SectionItem build() { + com.google.chat.v1.SectionItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.SectionItem buildPartial() { + com.google.chat.v1.SectionItem result = new com.google.chat.v1.SectionItem(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.SectionItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs(com.google.chat.v1.SectionItem result) { + result.itemCase_ = itemCase_; + result.item_ = this.item_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.chat.v1.SectionItem) { + return mergeFrom((com.google.chat.v1.SectionItem) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.SectionItem other) { + if (other == com.google.chat.v1.SectionItem.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getItemCase()) { + case SPACE: + { + itemCase_ = 2; + item_ = other.item_; + onChanged(); + break; + } + case ITEM_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_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + itemCase_ = 2; + item_ = 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 itemCase_ = 0; + private java.lang.Object item_; + + public ItemCase getItemCase() { + return ItemCase.forNumber(itemCase_); + } + + public Builder clearItem() { + itemCase_ = 0; + item_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the section item.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * 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. The resource name of the section item.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * 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. The resource name of the section item.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * 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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the section item.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the section item.
+     *
+     * Format: `users/{user}/sections/{section}/items/{item}`
+     * 
+ * + * 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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The space resource name.
+     *
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the space field is set. + */ + @java.lang.Override + public boolean hasSpace() { + return itemCase_ == 2; + } + + /** + * + * + *
+     * Optional. The space resource name.
+     *
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The space. + */ + @java.lang.Override + public java.lang.String getSpace() { + java.lang.Object ref = ""; + if (itemCase_ == 2) { + ref = item_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (itemCase_ == 2) { + item_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The space resource name.
+     *
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for space. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpaceBytes() { + java.lang.Object ref = ""; + if (itemCase_ == 2) { + ref = item_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (itemCase_ == 2) { + item_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The space resource name.
+     *
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The space to set. + * @return This builder for chaining. + */ + public Builder setSpace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + itemCase_ = 2; + item_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The space resource name.
+     *
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpace() { + if (itemCase_ == 2) { + itemCase_ = 0; + item_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The space resource name.
+     *
+     * Format: `spaces/{space}`
+     * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for space to set. + * @return This builder for chaining. + */ + public Builder setSpaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + itemCase_ = 2; + item_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.chat.v1.SectionItem) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.SectionItem) + private static final com.google.chat.v1.SectionItem DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.SectionItem(); + } + + public static com.google.chat.v1.SectionItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SectionItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.SectionItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItemName.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItemName.java new file mode 100644 index 000000000000..1fb239f27860 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItemName.java @@ -0,0 +1,216 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1; + +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 SectionItemName implements ResourceName { + private static final PathTemplate USER_SECTION_ITEM = + PathTemplate.createWithoutUrlEncoding("users/{user}/sections/{section}/items/{item}"); + private volatile Map fieldValuesMap; + private final String user; + private final String section; + private final String item; + + @Deprecated + protected SectionItemName() { + user = null; + section = null; + item = null; + } + + private SectionItemName(Builder builder) { + user = Preconditions.checkNotNull(builder.getUser()); + section = Preconditions.checkNotNull(builder.getSection()); + item = Preconditions.checkNotNull(builder.getItem()); + } + + public String getUser() { + return user; + } + + public String getSection() { + return section; + } + + public String getItem() { + return item; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SectionItemName of(String user, String section, String item) { + return newBuilder().setUser(user).setSection(section).setItem(item).build(); + } + + public static String format(String user, String section, String item) { + return newBuilder().setUser(user).setSection(section).setItem(item).build().toString(); + } + + public static SectionItemName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + USER_SECTION_ITEM.validatedMatch( + formattedString, "SectionItemName.parse: formattedString not in valid format"); + return of(matchMap.get("user"), matchMap.get("section"), matchMap.get("item")); + } + + 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 (SectionItemName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return USER_SECTION_ITEM.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (user != null) { + fieldMapBuilder.put("user", user); + } + if (section != null) { + fieldMapBuilder.put("section", section); + } + if (item != null) { + fieldMapBuilder.put("item", item); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return USER_SECTION_ITEM.instantiate("user", user, "section", section, "item", item); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SectionItemName that = ((SectionItemName) o); + return Objects.equals(this.user, that.user) + && Objects.equals(this.section, that.section) + && Objects.equals(this.item, that.item); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(user); + h *= 1000003; + h ^= Objects.hashCode(section); + h *= 1000003; + h ^= Objects.hashCode(item); + return h; + } + + /** Builder for users/{user}/sections/{section}/items/{item}. */ + public static class Builder { + private String user; + private String section; + private String item; + + protected Builder() {} + + public String getUser() { + return user; + } + + public String getSection() { + return section; + } + + public String getItem() { + return item; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + public Builder setSection(String section) { + this.section = section; + return this; + } + + public Builder setItem(String item) { + this.item = item; + return this; + } + + private Builder(SectionItemName sectionItemName) { + this.user = sectionItemName.user; + this.section = sectionItemName.section; + this.item = sectionItemName.item; + } + + public SectionItemName build() { + return new SectionItemName(this); + } + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItemOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItemOrBuilder.java new file mode 100644 index 000000000000..9cd83239b412 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionItemOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface SectionItemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.SectionItem) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the section item.
+   *
+   * Format: `users/{user}/sections/{section}/items/{item}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the section item.
+   *
+   * Format: `users/{user}/sections/{section}/items/{item}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The space resource name.
+   *
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the space field is set. + */ + boolean hasSpace(); + + /** + * + * + *
+   * Optional. The space resource name.
+   *
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The space. + */ + java.lang.String getSpace(); + + /** + * + * + *
+   * Optional. The space resource name.
+   *
+   * Format: `spaces/{space}`
+   * 
+ * + * + * string space = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for space. + */ + com.google.protobuf.ByteString getSpaceBytes(); + + com.google.chat.v1.SectionItem.ItemCase getItemCase(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionName.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionName.java new file mode 100644 index 000000000000..92610ea11188 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionName.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.chat.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 SectionName implements ResourceName { + private static final PathTemplate USER_SECTION = + PathTemplate.createWithoutUrlEncoding("users/{user}/sections/{section}"); + private volatile Map fieldValuesMap; + private final String user; + private final String section; + + @Deprecated + protected SectionName() { + user = null; + section = null; + } + + private SectionName(Builder builder) { + user = Preconditions.checkNotNull(builder.getUser()); + section = Preconditions.checkNotNull(builder.getSection()); + } + + public String getUser() { + return user; + } + + public String getSection() { + return section; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SectionName of(String user, String section) { + return newBuilder().setUser(user).setSection(section).build(); + } + + public static String format(String user, String section) { + return newBuilder().setUser(user).setSection(section).build().toString(); + } + + public static SectionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + USER_SECTION.validatedMatch( + formattedString, "SectionName.parse: formattedString not in valid format"); + return of(matchMap.get("user"), matchMap.get("section")); + } + + 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 (SectionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return USER_SECTION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (user != null) { + fieldMapBuilder.put("user", user); + } + if (section != null) { + fieldMapBuilder.put("section", section); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return USER_SECTION.instantiate("user", user, "section", section); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SectionName that = ((SectionName) o); + return Objects.equals(this.user, that.user) && Objects.equals(this.section, that.section); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(user); + h *= 1000003; + h ^= Objects.hashCode(section); + return h; + } + + /** Builder for users/{user}/sections/{section}. */ + public static class Builder { + private String user; + private String section; + + protected Builder() {} + + public String getUser() { + return user; + } + + public String getSection() { + return section; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + public Builder setSection(String section) { + this.section = section; + return this; + } + + private Builder(SectionName sectionName) { + this.user = sectionName.user; + this.section = sectionName.section; + } + + public SectionName build() { + return new SectionName(this); + } + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionOrBuilder.java new file mode 100644 index 000000000000..d6331029935c --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface SectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.Section) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Resource name of the section.
+   *
+   * For system sections, the section ID is a constant string:
+   *
+   * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+   * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+   * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Resource name of the section.
+   *
+   * For system sections, the section ID is a constant string:
+   *
+   * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
+   * - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
+   * - DEFAULT_APPS: `users/{user}/sections/default-apps`
+   *
+   * Format: `users/{user}/sections/{section}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The section's display name. Only populated for sections of type
+   * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+   * `CUSTOM_SECTION`.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. The section's display name. Only populated for sections of type
+   * `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
+   * `CUSTOM_SECTION`.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The order of the section in relation to other sections.
+   * Sections with a lower `sort_order` value appear before sections with a
+   * higher value.
+   * 
+ * + * int32 sort_order = 3; + * + * @return The sortOrder. + */ + int getSortOrder(); + + /** + * + * + *
+   * Required. The type of the section.
+   * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Required. The type of the section.
+   * 
+ * + * .google.chat.v1.Section.SectionType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.chat.v1.Section.SectionType getType(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionProto.java new file mode 100644 index 000000000000..a5272526564b --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SectionProto.java @@ -0,0 +1,308 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public final class SectionProto extends com.google.protobuf.GeneratedFile { + private SectionProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SectionProto"); + } + + 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_chat_v1_Section_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_Section_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_SectionItem_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_SectionItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_CreateSectionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_CreateSectionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_DeleteSectionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_DeleteSectionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_UpdateSectionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_UpdateSectionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_ListSectionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_ListSectionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_ListSectionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_ListSectionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_PositionSectionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_PositionSectionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_PositionSectionResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_PositionSectionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_ListSectionItemsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_ListSectionItemsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_ListSectionItemsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_ListSectionItemsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_MoveSectionItemRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_MoveSectionItemRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_chat_v1_MoveSectionItemResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_chat_v1_MoveSectionItemResponse_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" + + "\034google/chat/v1/section.proto\022\016google.c" + + "hat.v1\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\032" + + " google/protobuf/field_mask.proto\"\336\002\n" + + "\007Section\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\001\022\022\n\n" + + "sort_order\030\003 \001(\005\0226\n" + + "\004type\030\004" + + " \001(\0162#.google.chat.v1.Section.SectionTypeB\003\340A\002\"\202\001\n" + + "\013SectionType\022\034\n" + + "\030SECTION_TYPE_UNSPECIFIED\020\000\022\022\n" + + "\016CUSTOM_SECTION\020\001\022\033\n" + + "\027DEFAULT_DIRECT_MESSAGES\020\002\022\022\n" + + "\016DEFAULT_SPACES\020\003\022\020\n" + + "\014DEFAULT_APPS\020\006:T\352AQ\n" + + "\033chat.googleapis.com/Sectio" + + "n\022\037users/{user}/sections/{section}*\010sections2\007section\"\313\001\n" + + "\013SectionItem\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0222\n" + + "\005space\030\002 \001(\tB!\340A\001\372A\033\n" + + "\031chat.googleapis.com/SpaceH\000:m\352Aj\n" + + "\037chat.googleapis.com/SectionItem\022,users/{user}/section" + + "s/{section}/items/{item}*\014sectionItems2\013sectionItemB\006\n" + + "\004item\"w\n" + + "\024CreateSectionRequest\0220\n" + + "\006parent\030\001 \001(\tB \340A\002\372A\032\n" + + "\030chat.googleapis.com/User\022-\n" + + "\007section\030\002 \001(\0132\027.google.chat.v1.SectionB\003\340A\002\"I\n" + + "\024DeleteSectionRequest\0221\n" + + "\004name\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033chat.googleapis.com/Section\"{\n" + + "\024UpdateSectionRequest\022-\n" + + "\007section\030\001 \001(\0132\027.google.chat.v1.SectionB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"x\n" + + "\023ListSectionsRequest\0220\n" + + "\006parent\030\001 \001(\tB \340A\002\372A\032\n" + + "\030chat.googleapis.com/User\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\"Z\n" + + "\024ListSectionsResponse\022)\n" + + "\010sections\030\001 \003(\0132\027.google.chat.v1.Section\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\377\001\n" + + "\026PositionSectionRequest\0221\n" + + "\004name\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033chat.googleapis.com/Section\022\031\n\n" + + "sort_order\030\002 \001(\005B\003\340A\001H\000\022Q\n" + + "\021relative_position\030\003" + + " \001(\0162/.google.chat.v1.PositionSectionRequest.PositionB\003\340A\001H\000\"8\n" + + "\010Position\022\030\n" + + "\024POSITION_UNSPECIFIED\020\000\022\t\n" + + "\005START\020\001\022\007\n" + + "\003END\020\002B\n\n" + + "\010position\"C\n" + + "\027PositionSectionResponse\022(\n" + + "\007section\030\001 \001(\0132\027.google.chat.v1.Section\"\224\001\n" + + "\027ListSectionItemsRequest\0223\n" + + "\006parent\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033chat.googleapis.com/Section\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\"g\n" + + "\030ListSectionItemsResponse\0222\n\r" + + "section_items\030\001 \003(\0132\033.google.chat.v1.SectionItem\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\214\001\n" + + "\026MoveSectionItemRequest\0225\n" + + "\004name\030\001 \001(\tB\'\340A\002\372A!\n" + + "\037chat.googleapis.com/SectionItem\022;\n" + + "\016target_section\030\002 \001(\tB#\340A\002\372A\035\n" + + "\033chat.googleapis.com/Section\"L\n" + + "\027MoveSectionItemResponse\0221\n" + + "\014section_item\030\001 \001(\0132\033.google.chat.v1.SectionItemB\320\001\n" + + "\022com.google.chat.v1B\014SectionProtoP\001Z,c" + + "loud.google.com/go/chat/apiv1/chatpb;cha" + + "tpb\242\002\013DYNAPIProto\252\002\023Google.Apps.Chat.V1\312" + + "\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1\352A(\n" + + "\030chat.googleapis.com/User\022\014users/{user}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.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_chat_v1_Section_descriptor = getDescriptor().getMessageType(0); + internal_static_google_chat_v1_Section_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_Section_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "SortOrder", "Type", + }); + internal_static_google_chat_v1_SectionItem_descriptor = getDescriptor().getMessageType(1); + internal_static_google_chat_v1_SectionItem_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_SectionItem_descriptor, + new java.lang.String[] { + "Name", "Space", "Item", + }); + internal_static_google_chat_v1_CreateSectionRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_chat_v1_CreateSectionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_CreateSectionRequest_descriptor, + new java.lang.String[] { + "Parent", "Section", + }); + internal_static_google_chat_v1_DeleteSectionRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_chat_v1_DeleteSectionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_DeleteSectionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_chat_v1_UpdateSectionRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_chat_v1_UpdateSectionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_UpdateSectionRequest_descriptor, + new java.lang.String[] { + "Section", "UpdateMask", + }); + internal_static_google_chat_v1_ListSectionsRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_chat_v1_ListSectionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_ListSectionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_chat_v1_ListSectionsResponse_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_chat_v1_ListSectionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_ListSectionsResponse_descriptor, + new java.lang.String[] { + "Sections", "NextPageToken", + }); + internal_static_google_chat_v1_PositionSectionRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_chat_v1_PositionSectionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_PositionSectionRequest_descriptor, + new java.lang.String[] { + "Name", "SortOrder", "RelativePosition", "Position", + }); + internal_static_google_chat_v1_PositionSectionResponse_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_chat_v1_PositionSectionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_PositionSectionResponse_descriptor, + new java.lang.String[] { + "Section", + }); + internal_static_google_chat_v1_ListSectionItemsRequest_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_chat_v1_ListSectionItemsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_ListSectionItemsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_chat_v1_ListSectionItemsResponse_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_chat_v1_ListSectionItemsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_ListSectionItemsResponse_descriptor, + new java.lang.String[] { + "SectionItems", "NextPageToken", + }); + internal_static_google_chat_v1_MoveSectionItemRequest_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_chat_v1_MoveSectionItemRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_MoveSectionItemRequest_descriptor, + new java.lang.String[] { + "Name", "TargetSection", + }); + internal_static_google_chat_v1_MoveSectionItemResponse_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_chat_v1_MoveSectionItemResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_chat_v1_MoveSectionItemResponse_descriptor, + new java.lang.String[] { + "SectionItem", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.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.resourceDefinition); + 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-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UpdateSectionRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UpdateSectionRequest.java new file mode 100644 index 000000000000..8e02e8a7878d --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UpdateSectionRequest.java @@ -0,0 +1,1024 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +/** + * + * + *
+ * Request message for updating a section.
+ * 
+ * + * Protobuf type {@code google.chat.v1.UpdateSectionRequest} + */ +@com.google.protobuf.Generated +public final class UpdateSectionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.chat.v1.UpdateSectionRequest) + UpdateSectionRequestOrBuilder { + 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= */ "", + "UpdateSectionRequest"); + } + + // Use UpdateSectionRequest.newBuilder() to construct. + private UpdateSectionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateSectionRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_UpdateSectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_UpdateSectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.UpdateSectionRequest.class, + com.google.chat.v1.UpdateSectionRequest.Builder.class); + } + + private int bitField0_; + public static final int SECTION_FIELD_NUMBER = 1; + private com.google.chat.v1.Section section_; + + /** + * + * + *
+   * Required. The section to update.
+   * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the section field is set. + */ + @java.lang.Override + public boolean hasSection() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The section to update.
+   * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The section. + */ + @java.lang.Override + public com.google.chat.v1.Section getSection() { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + + /** + * + * + *
+   * Required. The section to update.
+   * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.chat.v1.SectionOrBuilder getSectionOrBuilder() { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The mask to specify which fields to update.
+   *
+   * Currently supported field paths:
+   *
+   * - `display_name`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The mask to specify which fields to update.
+   *
+   * Currently supported field paths:
+   *
+   * - `display_name`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. The mask to specify which fields to update.
+   *
+   * Currently supported field paths:
+   *
+   * - `display_name`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @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, getSection()); + } + 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, getSection()); + } + 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.chat.v1.UpdateSectionRequest)) { + return super.equals(obj); + } + com.google.chat.v1.UpdateSectionRequest other = (com.google.chat.v1.UpdateSectionRequest) obj; + + if (hasSection() != other.hasSection()) return false; + if (hasSection()) { + if (!getSection().equals(other.getSection())) 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 (hasSection()) { + hash = (37 * hash) + SECTION_FIELD_NUMBER; + hash = (53 * hash) + getSection().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.chat.v1.UpdateSectionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.UpdateSectionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.chat.v1.UpdateSectionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.chat.v1.UpdateSectionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.chat.v1.UpdateSectionRequest 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 updating a section.
+   * 
+ * + * Protobuf type {@code google.chat.v1.UpdateSectionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.chat.v1.UpdateSectionRequest) + com.google.chat.v1.UpdateSectionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_UpdateSectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.chat.v1.SectionProto + .internal_static_google_chat_v1_UpdateSectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.chat.v1.UpdateSectionRequest.class, + com.google.chat.v1.UpdateSectionRequest.Builder.class); + } + + // Construct using com.google.chat.v1.UpdateSectionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSectionFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + section_ = null; + if (sectionBuilder_ != null) { + sectionBuilder_.dispose(); + sectionBuilder_ = 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.chat.v1.SectionProto + .internal_static_google_chat_v1_UpdateSectionRequest_descriptor; + } + + @java.lang.Override + public com.google.chat.v1.UpdateSectionRequest getDefaultInstanceForType() { + return com.google.chat.v1.UpdateSectionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.chat.v1.UpdateSectionRequest build() { + com.google.chat.v1.UpdateSectionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.chat.v1.UpdateSectionRequest buildPartial() { + com.google.chat.v1.UpdateSectionRequest result = + new com.google.chat.v1.UpdateSectionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.chat.v1.UpdateSectionRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.section_ = sectionBuilder_ == null ? section_ : sectionBuilder_.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.chat.v1.UpdateSectionRequest) { + return mergeFrom((com.google.chat.v1.UpdateSectionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.chat.v1.UpdateSectionRequest other) { + if (other == com.google.chat.v1.UpdateSectionRequest.getDefaultInstance()) return this; + if (other.hasSection()) { + mergeSection(other.getSection()); + } + 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(internalGetSectionFieldBuilder().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.chat.v1.Section section_; + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder> + sectionBuilder_; + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the section field is set. + */ + public boolean hasSection() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The section. + */ + public com.google.chat.v1.Section getSection() { + if (sectionBuilder_ == null) { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } else { + return sectionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setSection(com.google.chat.v1.Section value) { + if (sectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + section_ = value; + } else { + sectionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setSection(com.google.chat.v1.Section.Builder builderForValue) { + if (sectionBuilder_ == null) { + section_ = builderForValue.build(); + } else { + sectionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeSection(com.google.chat.v1.Section value) { + if (sectionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && section_ != null + && section_ != com.google.chat.v1.Section.getDefaultInstance()) { + getSectionBuilder().mergeFrom(value); + } else { + section_ = value; + } + } else { + sectionBuilder_.mergeFrom(value); + } + if (section_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearSection() { + bitField0_ = (bitField0_ & ~0x00000001); + section_ = null; + if (sectionBuilder_ != null) { + sectionBuilder_.dispose(); + sectionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.chat.v1.Section.Builder getSectionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSectionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.chat.v1.SectionOrBuilder getSectionOrBuilder() { + if (sectionBuilder_ != null) { + return sectionBuilder_.getMessageOrBuilder(); + } else { + return section_ == null ? com.google.chat.v1.Section.getDefaultInstance() : section_; + } + } + + /** + * + * + *
+     * Required. The section to update.
+     * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder> + internalGetSectionFieldBuilder() { + if (sectionBuilder_ == null) { + sectionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.chat.v1.Section, + com.google.chat.v1.Section.Builder, + com.google.chat.v1.SectionOrBuilder>( + getSection(), getParentForChildren(), isClean()); + section_ = null; + } + return sectionBuilder_; + } + + 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_; + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. The mask to specify which fields to update.
+     *
+     * Currently supported field paths:
+     *
+     * - `display_name`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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.chat.v1.UpdateSectionRequest) + } + + // @@protoc_insertion_point(class_scope:google.chat.v1.UpdateSectionRequest) + private static final com.google.chat.v1.UpdateSectionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.chat.v1.UpdateSectionRequest(); + } + + public static com.google.chat.v1.UpdateSectionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSectionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.chat.v1.UpdateSectionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UpdateSectionRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UpdateSectionRequestOrBuilder.java new file mode 100644 index 000000000000..5ccbbbb41a95 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UpdateSectionRequestOrBuilder.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/chat/v1/section.proto +// Protobuf Java Version: 4.33.2 + +package com.google.chat.v1; + +@com.google.protobuf.Generated +public interface UpdateSectionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.chat.v1.UpdateSectionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The section to update.
+   * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the section field is set. + */ + boolean hasSection(); + + /** + * + * + *
+   * Required. The section to update.
+   * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The section. + */ + com.google.chat.v1.Section getSection(); + + /** + * + * + *
+   * Required. The section to update.
+   * 
+ * + * .google.chat.v1.Section section = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.chat.v1.SectionOrBuilder getSectionOrBuilder(); + + /** + * + * + *
+   * Required. The mask to specify which fields to update.
+   *
+   * Currently supported field paths:
+   *
+   * - `display_name`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The mask to specify which fields to update.
+   *
+   * Currently supported field paths:
+   *
+   * - `display_name`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The mask to specify which fields to update.
+   *
+   * Currently supported field paths:
+   *
+   * - `display_name`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UserName.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UserName.java new file mode 100644 index 000000000000..87e915cc1b55 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UserName.java @@ -0,0 +1,166 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1; + +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 UserName implements ResourceName { + private static final PathTemplate USER = PathTemplate.createWithoutUrlEncoding("users/{user}"); + private volatile Map fieldValuesMap; + private final String user; + + @Deprecated + protected UserName() { + user = null; + } + + private UserName(Builder builder) { + user = Preconditions.checkNotNull(builder.getUser()); + } + + public String getUser() { + return user; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static UserName of(String user) { + return newBuilder().setUser(user).build(); + } + + public static String format(String user) { + return newBuilder().setUser(user).build().toString(); + } + + public static UserName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + USER.validatedMatch(formattedString, "UserName.parse: formattedString not in valid format"); + return of(matchMap.get("user")); + } + + 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 (UserName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return USER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (user != null) { + fieldMapBuilder.put("user", user); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return USER.instantiate("user", user); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + UserName that = ((UserName) o); + return Objects.equals(this.user, that.user); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(user); + return h; + } + + /** Builder for users/{user}. */ + public static class Builder { + private String user; + + protected Builder() {} + + public String getUser() { + return user; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + private Builder(UserName userName) { + this.user = userName.user; + } + + public UserName build() { + return new UserName(this); + } + } +} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto index 9bd027c25760..afc37c0bbced 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto @@ -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/chat/v1/attachment.proto"; import "google/chat/v1/membership.proto"; import "google/chat/v1/message.proto"; import "google/chat/v1/reaction.proto"; +import "google/chat/v1/section.proto"; import "google/chat/v1/space.proto"; import "google/chat/v1/space_event.proto"; import "google/chat/v1/space_notification_setting.proto"; @@ -51,9 +52,11 @@ service ChatService { "https://www.googleapis.com/auth/chat.admin.spaces.readonly," "https://www.googleapis.com/auth/chat.app.delete," "https://www.googleapis.com/auth/chat.app.memberships," + "https://www.googleapis.com/auth/chat.app.memberships.readonly," "https://www.googleapis.com/auth/chat.app.messages.readonly," "https://www.googleapis.com/auth/chat.app.spaces," "https://www.googleapis.com/auth/chat.app.spaces.create," + "https://www.googleapis.com/auth/chat.app.spaces.readonly," "https://www.googleapis.com/auth/chat.bot," "https://www.googleapis.com/auth/chat.customemojis," "https://www.googleapis.com/auth/chat.customemojis.readonly," @@ -73,6 +76,8 @@ service ChatService { "https://www.googleapis.com/auth/chat.spaces.readonly," "https://www.googleapis.com/auth/chat.users.readstate," "https://www.googleapis.com/auth/chat.users.readstate.readonly," + "https://www.googleapis.com/auth/chat.users.sections," + "https://www.googleapis.com/auth/chat.users.sections.readonly," "https://www.googleapis.com/auth/chat.users.spacesettings"; // Creates a message in a Google Chat space. For an example, see [Send a @@ -142,9 +147,8 @@ service ChatService { // - [App // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with [administrator - // approval](https://support.google.com/a?p=chat-app-auth) in - // [Developer Preview](https://developers.google.com/workspace/preview) - // with the authorization scope: + // approval](https://support.google.com/a?p=chat-app-auth) + // with the authorization scope: // - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When // using this authentication scope, this method only returns public // messages in a space. It doesn't include private messages. @@ -253,8 +257,7 @@ service ChatService { // that invoke the Chat app. // - `https://www.googleapis.com/auth/chat.app.messages.readonly` // with [administrator - // approval](https://support.google.com/a?p=chat-app-auth) (available in - // [Developer Preview](https://developers.google.com/workspace/preview)). + // approval](https://support.google.com/a?p=chat-app-auth). // When using this authentication scope, // this method returns details about a public message in a space. // @@ -1074,12 +1077,13 @@ service ChatService { // - [App // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with [administrator - // approval](https://support.google.com/a?p=chat-app-auth) in - // [Developer Preview](https://developers.google.com/workspace/preview) - // with one of the following authorization scopes: + // approval](https://support.google.com/a?p=chat-app-auth) + // with one of the following authorization scopes: // - `https://www.googleapis.com/auth/chat.app.spaces` + // - `https://www.googleapis.com/auth/chat.app.spaces.readonly` // - `https://www.googleapis.com/auth/chat.app.messages.readonly` // - `https://www.googleapis.com/auth/chat.app.memberships` + // - `https://www.googleapis.com/auth/chat.app.memberships.readonly` // // - [User // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -1123,12 +1127,13 @@ service ChatService { // - [App // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // with [administrator - // approval](https://support.google.com/a?p=chat-app-auth) in - // [Developer Preview](https://developers.google.com/workspace/preview) - // with one of the following authorization scopes: + // approval](https://support.google.com/a?p=chat-app-auth) + // with one of the following authorization scopes: // - `https://www.googleapis.com/auth/chat.app.spaces` + // - `https://www.googleapis.com/auth/chat.app.spaces.readonly` // - `https://www.googleapis.com/auth/chat.app.messages.readonly` // - `https://www.googleapis.com/auth/chat.app.memberships` + // - `https://www.googleapis.com/auth/chat.app.memberships.readonly` // // - [User // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) @@ -1191,4 +1196,139 @@ service ChatService { option (google.api.method_signature) = "space_notification_setting,update_mask"; } + + // Creates a section in Google Chat. Sections help users group conversations + // and customize the list of spaces displayed in Chat navigation panel. Only + // sections of type `CUSTOM_SECTION` can be created. For details, see [Create + // and organize sections in Google + // Chat](https://support.google.com/chat/answer/16059854). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with the [authorization + // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.users.sections` + rpc CreateSection(CreateSectionRequest) returns (Section) { + option (google.api.http) = { + post: "/v1/{parent=users/*}/sections" + body: "section" + }; + option (google.api.method_signature) = "parent,section"; + } + + // Deletes a section of type `CUSTOM_SECTION`. + // + // If the section contains items, such as spaces, the items are moved to + // Google Chat's default sections and are not deleted. + // + // For details, see [Create and organize sections in Google + // Chat](https://support.google.com/chat/answer/16059854). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with the [authorization + // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.users.sections` + rpc DeleteSection(DeleteSectionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=users/*/sections/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. + // For details, see [Create and organize sections in Google + // Chat](https://support.google.com/chat/answer/16059854). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with the [authorization + // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.users.sections` + rpc UpdateSection(UpdateSectionRequest) returns (Section) { + option (google.api.http) = { + patch: "/v1/{section.name=users/*/sections/*}" + body: "section" + }; + option (google.api.method_signature) = "section,update_mask"; + } + + // Lists sections available to the Chat user. Sections help users group their + // conversations and customize the list of spaces displayed in Chat + // navigation panel. For details, see [Create and organize sections in Google + // Chat](https://support.google.com/chat/answer/16059854). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with the [authorization + // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.users.sections` + // - `https://www.googleapis.com/auth/chat.users.sections.readonly` + rpc ListSections(ListSectionsRequest) returns (ListSectionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=users/*}/sections" + }; + option (google.api.method_signature) = "parent"; + } + + // Changes the sort order of a section. For details, see [Create and organize + // sections in Google Chat](https://support.google.com/chat/answer/16059854). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with the [authorization + // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.users.sections` + rpc PositionSection(PositionSectionRequest) + returns (PositionSectionResponse) { + option (google.api.http) = { + post: "/v1/{name=users/*/sections/*}:position" + body: "*" + }; + } + + // Lists items in a section. + // + // Only spaces can be section items. For details, see [Create and organize + // sections in Google Chat](https://support.google.com/chat/answer/16059854). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with the [authorization + // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.users.sections` + // - `https://www.googleapis.com/auth/chat.users.sections.readonly` + rpc ListSectionItems(ListSectionItemsRequest) + returns (ListSectionItemsResponse) { + option (google.api.http) = { + get: "/v1/{parent=users/*/sections/*}/items" + }; + option (google.api.method_signature) = "parent"; + } + + // Moves an item from one section to another. For example, if a section + // contains spaces, this method can be used to move a space to a different + // section. For details, see [Create and organize sections in Google + // Chat](https://support.google.com/chat/answer/16059854). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + // with the [authorization + // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + // + // - `https://www.googleapis.com/auth/chat.users.sections` + rpc MoveSectionItem(MoveSectionItemRequest) + returns (MoveSectionItemResponse) { + option (google.api.http) = { + post: "/v1/{name=users/*/sections/*/items/*}:move" + body: "*" + }; + option (google.api.method_signature) = "name,target_section"; + } } diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/section.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/section.proto new file mode 100644 index 000000000000..2fdbf2e5c0b4 --- /dev/null +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/section.proto @@ -0,0 +1,344 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.chat.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Apps.Chat.V1"; +option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; +option java_multiple_files = true; +option java_outer_classname = "SectionProto"; +option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; +option php_namespace = "Google\\Apps\\Chat\\V1"; +option ruby_package = "Google::Apps::Chat::V1"; +option (google.api.resource_definition) = { + type: "chat.googleapis.com/User" + pattern: "users/{user}" +}; + +// Represents a [section](https://support.google.com/chat/answer/16059854) in +// Google Chat. Sections help users organize their spaces. There are two types +// of sections: +// +// 1. **System Sections:** These are predefined sections managed by Google +// Chat. +// Their resource names are fixed, and they cannot be created, deleted, or +// have their `display_name` modified. Examples include: +// * `users/{user}/sections/default-direct-messages` +// * `users/{user}/sections/default-spaces` +// * `users/{user}/sections/default-apps` +// +// 2. **Custom Sections:** These are sections created and managed by the user. +// Creating a custom section using `CreateSection` **requires** a +// `display_name`. Custom sections can be updated using `UpdateSection` and +// deleted using `DeleteSection`. +message Section { + option (google.api.resource) = { + type: "chat.googleapis.com/Section" + pattern: "users/{user}/sections/{section}" + plural: "sections" + singular: "section" + }; + + // Section types. + enum SectionType { + // Unspecified section type. + SECTION_TYPE_UNSPECIFIED = 0; + + // Custom section. + CUSTOM_SECTION = 1; + + // Default section containing + // [DIRECT_MESSAGE](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype) + // between two human users or + // [GROUP_CHAT](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype) + // spaces that don't belong to any custom section. + DEFAULT_DIRECT_MESSAGES = 2; + + // Default spaces that don't belong to any custom section. + DEFAULT_SPACES = 3; + + // Default section containing a user's installed apps. + DEFAULT_APPS = 6; + } + + // Identifier. Resource name of the section. + // + // For system sections, the section ID is a constant string: + // + // - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` + // - DEFAULT_SPACES: `users/{user}/sections/default-spaces` + // - DEFAULT_APPS: `users/{user}/sections/default-apps` + // + // Format: `users/{user}/sections/{section}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The section's display name. Only populated for sections of type + // `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a + // `CUSTOM_SECTION`. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The order of the section in relation to other sections. + // Sections with a lower `sort_order` value appear before sections with a + // higher value. + int32 sort_order = 3; + + // Required. The type of the section. + SectionType type = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// A user's defined section item. This is used to represent section items, such +// as spaces, grouped under a section. +message SectionItem { + option (google.api.resource) = { + type: "chat.googleapis.com/SectionItem" + pattern: "users/{user}/sections/{section}/items/{item}" + plural: "sectionItems" + singular: "sectionItem" + }; + + // Identifier. The resource name of the section item. + // + // Format: `users/{user}/sections/{section}/items/{item}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The section item. + oneof item { + // Optional. The space resource name. + // + // Format: `spaces/{space}` + string space = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "chat.googleapis.com/Space" } + ]; + } +} + +// Request message for creating a section. +message CreateSectionRequest { + // Required. The parent resource name where the section is created. + // + // Format: `users/{user}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/User" } + ]; + + // Required. The section to create. + Section section = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for deleting a section. +// [Developer Preview](https://developers.google.com/workspace/preview). +message DeleteSectionRequest { + // Required. The name of the section to delete. + // + // Format: `users/{user}/sections/{section}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/Section" } + ]; +} + +// Request message for updating a section. +message UpdateSectionRequest { + // Required. The section to update. + Section section = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to specify which fields to update. + // + // Currently supported field paths: + // + // - `display_name` + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for listing sections. +message ListSectionsRequest { + // Required. The parent, which is the user resource name that owns this + // collection of sections. Only supports listing sections for the calling + // user. To refer to the calling user, set one of the following: + // + // - The `me` alias. For example, `users/me`. + // + // - Their Workspace email address. For example, `users/user@example.com`. + // + // - Their user id. For example, `users/123456789`. + // + // Format: `users/{user}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/User" } + ]; + + // Optional. The maximum number of sections to return. The service may return + // fewer than this value. + // + // If unspecified, at most 10 sections will be returned. + // + // The maximum value is 100. If you use a value more than 100, it's + // automatically changed to 100. + // + // Negative values return an `INVALID_ARGUMENT` error. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous list sections call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided should match the call that + // provided the page token. Passing different values to the other parameters + // might lead to unexpected results. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing sections. +message ListSectionsResponse { + // The sections from the specified user. + repeated Section sections = 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 positioning a section. +message PositionSectionRequest { + // The position of the section. + enum Position { + // Unspecified position. + POSITION_UNSPECIFIED = 0; + + // Start of the list of sections. + START = 1; + + // End of the list of sections. + END = 2; + } + + // Required. The resource name of the section to position. + // + // Format: `users/{user}/sections/{section}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/Section" } + ]; + + // Required. The new position of the section. + oneof position { + // Optional. The absolute position of the section in the list of sections. + // The position must be greater than 0. If the position is greater than the + // number of sections, the section will be appended to the end of the list. + // This operation inserts the section at the given position and shifts the + // original section at that position, and those below it, to the next + // position. + int32 sort_order = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The relative position of the section in the list of sections. + Position relative_position = 3 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Response message for positioning a section. +message PositionSectionResponse { + // The updated section. + Section section = 1; +} + +// Request message for listing section items. +message ListSectionItemsRequest { + // Required. The parent, which is the section resource name that owns this + // collection of section items. Only supports listing section items for the + // calling user. + // + // When you're filtering by space, use the wildcard `-` to search across all + // sections. For example, `users/{user}/sections/-`. + // + // Format: `users/{user}/sections/{section}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/Section" } + ]; + + // Optional. The maximum number of section items to return. The service may + // return fewer than this value. + // + // If unspecified, at most 10 section items will be returned. + // + // The maximum value is 100. If you use a value more than 100, it's + // automatically changed to 100. + // + // Negative values return an `INVALID_ARGUMENT` error. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous list section items call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided should match the call that + // provided the page token. Passing different values to the other parameters + // might lead to unexpected results. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A query filter. + // + // Currently only supports filtering by space. + // + // For example, `space = spaces/{space}`. + // + // Invalid queries are rejected with an `INVALID_ARGUMENT` error. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing section items. +message ListSectionItemsResponse { + // The section items from the specified section. + repeated SectionItem section_items = 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 moving a section item across sections. +message MoveSectionItemRequest { + // Required. The resource name of the section item to move. + // + // Format: `users/{user}/sections/{section}/items/{item}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chat.googleapis.com/SectionItem" + } + ]; + + // Required. The resource name of the section to move the section item to. + // + // Format: `users/{user}/sections/{section}` + string target_section = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "chat.googleapis.com/Section" } + ]; +} + +// Response message for moving a section item. +message MoveSectionItemResponse { + // The updated section item. + SectionItem section_item = 1; +} diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/AsyncCreateSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/AsyncCreateSection.java new file mode 100644 index 000000000000..c193ccaacbd5 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/AsyncCreateSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_CreateSection_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.CreateSectionRequest; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; + +public class AsyncCreateSection { + + public static void main(String[] args) throws Exception { + asyncCreateSection(); + } + + public static void asyncCreateSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + CreateSectionRequest request = + CreateSectionRequest.newBuilder() + .setParent(UserName.of("[USER]").toString()) + .setSection(Section.newBuilder().build()) + .build(); + ApiFuture
future = chatServiceClient.createSectionCallable().futureCall(request); + // Do something. + Section response = future.get(); + } + } +} +// [END chat_v1_generated_ChatService_CreateSection_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSection.java new file mode 100644 index 000000000000..887fd9f7e37e --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_CreateSection_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.CreateSectionRequest; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; + +public class SyncCreateSection { + + public static void main(String[] args) throws Exception { + syncCreateSection(); + } + + public static void syncCreateSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + CreateSectionRequest request = + CreateSectionRequest.newBuilder() + .setParent(UserName.of("[USER]").toString()) + .setSection(Section.newBuilder().build()) + .build(); + Section response = chatServiceClient.createSection(request); + } + } +} +// [END chat_v1_generated_ChatService_CreateSection_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSectionStringSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSectionStringSection.java new file mode 100644 index 000000000000..aad2629de4db --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSectionStringSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_CreateSection_StringSection_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; + +public class SyncCreateSectionStringSection { + + public static void main(String[] args) throws Exception { + syncCreateSectionStringSection(); + } + + public static void syncCreateSectionStringSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String parent = UserName.of("[USER]").toString(); + Section section = Section.newBuilder().build(); + Section response = chatServiceClient.createSection(parent, section); + } + } +} +// [END chat_v1_generated_ChatService_CreateSection_StringSection_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSectionUsernameSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSectionUsernameSection.java new file mode 100644 index 000000000000..512209ec7ae6 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/createsection/SyncCreateSectionUsernameSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_CreateSection_UsernameSection_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; + +public class SyncCreateSectionUsernameSection { + + public static void main(String[] args) throws Exception { + syncCreateSectionUsernameSection(); + } + + public static void syncCreateSectionUsernameSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + UserName parent = UserName.of("[USER]"); + Section section = Section.newBuilder().build(); + Section response = chatServiceClient.createSection(parent, section); + } + } +} +// [END chat_v1_generated_ChatService_CreateSection_UsernameSection_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/AsyncDeleteSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/AsyncDeleteSection.java new file mode 100644 index 000000000000..8807c4f51b4c --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/AsyncDeleteSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_DeleteSection_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.DeleteSectionRequest; +import com.google.chat.v1.SectionName; +import com.google.protobuf.Empty; + +public class AsyncDeleteSection { + + public static void main(String[] args) throws Exception { + asyncDeleteSection(); + } + + public static void asyncDeleteSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + DeleteSectionRequest request = + DeleteSectionRequest.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + ApiFuture future = chatServiceClient.deleteSectionCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END chat_v1_generated_ChatService_DeleteSection_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSection.java new file mode 100644 index 000000000000..1ec023118d74 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_DeleteSection_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.DeleteSectionRequest; +import com.google.chat.v1.SectionName; +import com.google.protobuf.Empty; + +public class SyncDeleteSection { + + public static void main(String[] args) throws Exception { + syncDeleteSection(); + } + + public static void syncDeleteSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + DeleteSectionRequest request = + DeleteSectionRequest.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + chatServiceClient.deleteSection(request); + } + } +} +// [END chat_v1_generated_ChatService_DeleteSection_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSectionSectionname.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSectionSectionname.java new file mode 100644 index 000000000000..82bd1dbb2b47 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSectionSectionname.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_DeleteSection_Sectionname_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.SectionName; +import com.google.protobuf.Empty; + +public class SyncDeleteSectionSectionname { + + public static void main(String[] args) throws Exception { + syncDeleteSectionSectionname(); + } + + public static void syncDeleteSectionSectionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + SectionName name = SectionName.of("[USER]", "[SECTION]"); + chatServiceClient.deleteSection(name); + } + } +} +// [END chat_v1_generated_ChatService_DeleteSection_Sectionname_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSectionString.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSectionString.java new file mode 100644 index 000000000000..ac3026042f63 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/deletesection/SyncDeleteSectionString.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_DeleteSection_String_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.SectionName; +import com.google.protobuf.Empty; + +public class SyncDeleteSectionString { + + public static void main(String[] args) throws Exception { + syncDeleteSectionString(); + } + + public static void syncDeleteSectionString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String name = SectionName.of("[USER]", "[SECTION]").toString(); + chatServiceClient.deleteSection(name); + } + } +} +// [END chat_v1_generated_ChatService_DeleteSection_String_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/AsyncListSectionItems.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/AsyncListSectionItems.java new file mode 100644 index 000000000000..669be8b46fb8 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/AsyncListSectionItems.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSectionItems_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListSectionItemsRequest; +import com.google.chat.v1.SectionItem; +import com.google.chat.v1.SectionName; + +public class AsyncListSectionItems { + + public static void main(String[] args) throws Exception { + asyncListSectionItems(); + } + + public static void asyncListSectionItems() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListSectionItemsRequest request = + ListSectionItemsRequest.newBuilder() + .setParent(SectionName.of("[USER]", "[SECTION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + chatServiceClient.listSectionItemsPagedCallable().futureCall(request); + // Do something. + for (SectionItem element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListSectionItems_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/AsyncListSectionItemsPaged.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/AsyncListSectionItemsPaged.java new file mode 100644 index 000000000000..59d85345af44 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/AsyncListSectionItemsPaged.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSectionItems_Paged_async] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListSectionItemsRequest; +import com.google.chat.v1.ListSectionItemsResponse; +import com.google.chat.v1.SectionItem; +import com.google.chat.v1.SectionName; +import com.google.common.base.Strings; + +public class AsyncListSectionItemsPaged { + + public static void main(String[] args) throws Exception { + asyncListSectionItemsPaged(); + } + + public static void asyncListSectionItemsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListSectionItemsRequest request = + ListSectionItemsRequest.newBuilder() + .setParent(SectionName.of("[USER]", "[SECTION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListSectionItemsResponse response = + chatServiceClient.listSectionItemsCallable().call(request); + for (SectionItem element : response.getSectionItemsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END chat_v1_generated_ChatService_ListSectionItems_Paged_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItems.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItems.java new file mode 100644 index 000000000000..dd87451d5c33 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItems.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSectionItems_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListSectionItemsRequest; +import com.google.chat.v1.SectionItem; +import com.google.chat.v1.SectionName; + +public class SyncListSectionItems { + + public static void main(String[] args) throws Exception { + syncListSectionItems(); + } + + public static void syncListSectionItems() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListSectionItemsRequest request = + ListSectionItemsRequest.newBuilder() + .setParent(SectionName.of("[USER]", "[SECTION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (SectionItem element : chatServiceClient.listSectionItems(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListSectionItems_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItemsSectionname.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItemsSectionname.java new file mode 100644 index 000000000000..4d5699f66899 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItemsSectionname.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSectionItems_Sectionname_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.SectionItem; +import com.google.chat.v1.SectionName; + +public class SyncListSectionItemsSectionname { + + public static void main(String[] args) throws Exception { + syncListSectionItemsSectionname(); + } + + public static void syncListSectionItemsSectionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + SectionName parent = SectionName.of("[USER]", "[SECTION]"); + for (SectionItem element : chatServiceClient.listSectionItems(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListSectionItems_Sectionname_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItemsString.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItemsString.java new file mode 100644 index 000000000000..b582bd0393d6 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsectionitems/SyncListSectionItemsString.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSectionItems_String_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.SectionItem; +import com.google.chat.v1.SectionName; + +public class SyncListSectionItemsString { + + public static void main(String[] args) throws Exception { + syncListSectionItemsString(); + } + + public static void syncListSectionItemsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String parent = SectionName.of("[USER]", "[SECTION]").toString(); + for (SectionItem element : chatServiceClient.listSectionItems(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListSectionItems_String_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/AsyncListSections.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/AsyncListSections.java new file mode 100644 index 000000000000..64b0a9eae5ff --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/AsyncListSections.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSections_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListSectionsRequest; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; + +public class AsyncListSections { + + public static void main(String[] args) throws Exception { + asyncListSections(); + } + + public static void asyncListSections() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListSectionsRequest request = + ListSectionsRequest.newBuilder() + .setParent(UserName.of("[USER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture
future = chatServiceClient.listSectionsPagedCallable().futureCall(request); + // Do something. + for (Section element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListSections_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/AsyncListSectionsPaged.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/AsyncListSectionsPaged.java new file mode 100644 index 000000000000..e6e317f3d2aa --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/AsyncListSectionsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSections_Paged_async] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListSectionsRequest; +import com.google.chat.v1.ListSectionsResponse; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; +import com.google.common.base.Strings; + +public class AsyncListSectionsPaged { + + public static void main(String[] args) throws Exception { + asyncListSectionsPaged(); + } + + public static void asyncListSectionsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListSectionsRequest request = + ListSectionsRequest.newBuilder() + .setParent(UserName.of("[USER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListSectionsResponse response = chatServiceClient.listSectionsCallable().call(request); + for (Section element : response.getSectionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END chat_v1_generated_ChatService_ListSections_Paged_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSections.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSections.java new file mode 100644 index 000000000000..a3fc1dd321b4 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSections.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSections_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.ListSectionsRequest; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; + +public class SyncListSections { + + public static void main(String[] args) throws Exception { + syncListSections(); + } + + public static void syncListSections() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + ListSectionsRequest request = + ListSectionsRequest.newBuilder() + .setParent(UserName.of("[USER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Section element : chatServiceClient.listSections(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListSections_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSectionsString.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSectionsString.java new file mode 100644 index 000000000000..0de0f377cb93 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSectionsString.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSections_String_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; + +public class SyncListSectionsString { + + public static void main(String[] args) throws Exception { + syncListSectionsString(); + } + + public static void syncListSectionsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String parent = UserName.of("[USER]").toString(); + for (Section element : chatServiceClient.listSections(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListSections_String_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSectionsUsername.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSectionsUsername.java new file mode 100644 index 000000000000..91f203061595 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/listsections/SyncListSectionsUsername.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_ListSections_Username_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.Section; +import com.google.chat.v1.UserName; + +public class SyncListSectionsUsername { + + public static void main(String[] args) throws Exception { + syncListSectionsUsername(); + } + + public static void syncListSectionsUsername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + UserName parent = UserName.of("[USER]"); + for (Section element : chatServiceClient.listSections(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chat_v1_generated_ChatService_ListSections_Username_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/AsyncMoveSectionItem.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/AsyncMoveSectionItem.java new file mode 100644 index 000000000000..e5d86114d43f --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/AsyncMoveSectionItem.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_MoveSectionItem_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MoveSectionItemRequest; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.SectionItemName; +import com.google.chat.v1.SectionName; + +public class AsyncMoveSectionItem { + + public static void main(String[] args) throws Exception { + asyncMoveSectionItem(); + } + + public static void asyncMoveSectionItem() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + MoveSectionItemRequest request = + MoveSectionItemRequest.newBuilder() + .setName(SectionItemName.of("[USER]", "[SECTION]", "[ITEM]").toString()) + .setTargetSection(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + ApiFuture future = + chatServiceClient.moveSectionItemCallable().futureCall(request); + // Do something. + MoveSectionItemResponse response = future.get(); + } + } +} +// [END chat_v1_generated_ChatService_MoveSectionItem_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItem.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItem.java new file mode 100644 index 000000000000..9724b6b20bf2 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItem.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_MoveSectionItem_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MoveSectionItemRequest; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.SectionItemName; +import com.google.chat.v1.SectionName; + +public class SyncMoveSectionItem { + + public static void main(String[] args) throws Exception { + syncMoveSectionItem(); + } + + public static void syncMoveSectionItem() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + MoveSectionItemRequest request = + MoveSectionItemRequest.newBuilder() + .setName(SectionItemName.of("[USER]", "[SECTION]", "[ITEM]").toString()) + .setTargetSection(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + MoveSectionItemResponse response = chatServiceClient.moveSectionItem(request); + } + } +} +// [END chat_v1_generated_ChatService_MoveSectionItem_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemSectionitemnameSectionname.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemSectionitemnameSectionname.java new file mode 100644 index 000000000000..0d0127ba26a3 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemSectionitemnameSectionname.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_MoveSectionItem_SectionitemnameSectionname_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.SectionItemName; +import com.google.chat.v1.SectionName; + +public class SyncMoveSectionItemSectionitemnameSectionname { + + public static void main(String[] args) throws Exception { + syncMoveSectionItemSectionitemnameSectionname(); + } + + public static void syncMoveSectionItemSectionitemnameSectionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + MoveSectionItemResponse response = chatServiceClient.moveSectionItem(name, targetSection); + } + } +} +// [END chat_v1_generated_ChatService_MoveSectionItem_SectionitemnameSectionname_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemSectionitemnameString.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemSectionitemnameString.java new file mode 100644 index 000000000000..50087f200087 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemSectionitemnameString.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_MoveSectionItem_SectionitemnameString_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.SectionItemName; +import com.google.chat.v1.SectionName; + +public class SyncMoveSectionItemSectionitemnameString { + + public static void main(String[] args) throws Exception { + syncMoveSectionItemSectionitemnameString(); + } + + public static void syncMoveSectionItemSectionitemnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + SectionItemName name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]"); + String targetSection = SectionName.of("[USER]", "[SECTION]").toString(); + MoveSectionItemResponse response = chatServiceClient.moveSectionItem(name, targetSection); + } + } +} +// [END chat_v1_generated_ChatService_MoveSectionItem_SectionitemnameString_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemStringSectionname.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemStringSectionname.java new file mode 100644 index 000000000000..f57644b393e8 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemStringSectionname.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_MoveSectionItem_StringSectionname_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.SectionItemName; +import com.google.chat.v1.SectionName; + +public class SyncMoveSectionItemStringSectionname { + + public static void main(String[] args) throws Exception { + syncMoveSectionItemStringSectionname(); + } + + public static void syncMoveSectionItemStringSectionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]").toString(); + SectionName targetSection = SectionName.of("[USER]", "[SECTION]"); + MoveSectionItemResponse response = chatServiceClient.moveSectionItem(name, targetSection); + } + } +} +// [END chat_v1_generated_ChatService_MoveSectionItem_StringSectionname_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemStringString.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemStringString.java new file mode 100644 index 000000000000..a349638153d0 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/movesectionitem/SyncMoveSectionItemStringString.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_MoveSectionItem_StringString_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.MoveSectionItemResponse; +import com.google.chat.v1.SectionItemName; +import com.google.chat.v1.SectionName; + +public class SyncMoveSectionItemStringString { + + public static void main(String[] args) throws Exception { + syncMoveSectionItemStringString(); + } + + public static void syncMoveSectionItemStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + String name = SectionItemName.of("[USER]", "[SECTION]", "[ITEM]").toString(); + String targetSection = SectionName.of("[USER]", "[SECTION]").toString(); + MoveSectionItemResponse response = chatServiceClient.moveSectionItem(name, targetSection); + } + } +} +// [END chat_v1_generated_ChatService_MoveSectionItem_StringString_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/positionsection/AsyncPositionSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/positionsection/AsyncPositionSection.java new file mode 100644 index 000000000000..57ac78fa2da7 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/positionsection/AsyncPositionSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_PositionSection_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.PositionSectionRequest; +import com.google.chat.v1.PositionSectionResponse; +import com.google.chat.v1.SectionName; + +public class AsyncPositionSection { + + public static void main(String[] args) throws Exception { + asyncPositionSection(); + } + + public static void asyncPositionSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + PositionSectionRequest request = + PositionSectionRequest.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + ApiFuture future = + chatServiceClient.positionSectionCallable().futureCall(request); + // Do something. + PositionSectionResponse response = future.get(); + } + } +} +// [END chat_v1_generated_ChatService_PositionSection_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/positionsection/SyncPositionSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/positionsection/SyncPositionSection.java new file mode 100644 index 000000000000..ffec2b048ce9 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/positionsection/SyncPositionSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_PositionSection_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.PositionSectionRequest; +import com.google.chat.v1.PositionSectionResponse; +import com.google.chat.v1.SectionName; + +public class SyncPositionSection { + + public static void main(String[] args) throws Exception { + syncPositionSection(); + } + + public static void syncPositionSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + PositionSectionRequest request = + PositionSectionRequest.newBuilder() + .setName(SectionName.of("[USER]", "[SECTION]").toString()) + .build(); + PositionSectionResponse response = chatServiceClient.positionSection(request); + } + } +} +// [END chat_v1_generated_ChatService_PositionSection_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/AsyncUpdateSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/AsyncUpdateSection.java new file mode 100644 index 000000000000..78cefc02b602 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/AsyncUpdateSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_UpdateSection_async] +import com.google.api.core.ApiFuture; +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.Section; +import com.google.chat.v1.UpdateSectionRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSection { + + public static void main(String[] args) throws Exception { + asyncUpdateSection(); + } + + public static void asyncUpdateSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + UpdateSectionRequest request = + UpdateSectionRequest.newBuilder() + .setSection(Section.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture
future = chatServiceClient.updateSectionCallable().futureCall(request); + // Do something. + Section response = future.get(); + } + } +} +// [END chat_v1_generated_ChatService_UpdateSection_async] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/SyncUpdateSection.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/SyncUpdateSection.java new file mode 100644 index 000000000000..d85206549fb4 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/SyncUpdateSection.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_UpdateSection_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.Section; +import com.google.chat.v1.UpdateSectionRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSection { + + public static void main(String[] args) throws Exception { + syncUpdateSection(); + } + + public static void syncUpdateSection() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + UpdateSectionRequest request = + UpdateSectionRequest.newBuilder() + .setSection(Section.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Section response = chatServiceClient.updateSection(request); + } + } +} +// [END chat_v1_generated_ChatService_UpdateSection_sync] diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/SyncUpdateSectionSectionFieldmask.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/SyncUpdateSectionSectionFieldmask.java new file mode 100644 index 000000000000..1bf8c6c7dc61 --- /dev/null +++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/updatesection/SyncUpdateSectionSectionFieldmask.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.chat.v1.samples; + +// [START chat_v1_generated_ChatService_UpdateSection_SectionFieldmask_sync] +import com.google.chat.v1.ChatServiceClient; +import com.google.chat.v1.Section; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSectionSectionFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSectionSectionFieldmask(); + } + + public static void syncUpdateSectionSectionFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) { + Section section = Section.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Section response = chatServiceClient.updateSection(section, updateMask); + } + } +} +// [END chat_v1_generated_ChatService_UpdateSection_SectionFieldmask_sync] diff --git a/java-contentwarehouse/google-cloud-contentwarehouse/src/main/resources/META-INF/native-image/com.google.cloud.contentwarehouse.v1/reflect-config.json b/java-contentwarehouse/google-cloud-contentwarehouse/src/main/resources/META-INF/native-image/com.google.cloud.contentwarehouse.v1/reflect-config.json index df2682b3db7f..4f8528b29bb5 100644 --- a/java-contentwarehouse/google-cloud-contentwarehouse/src/main/resources/META-INF/native-image/com.google.cloud.contentwarehouse.v1/reflect-config.json +++ b/java-contentwarehouse/google-cloud-contentwarehouse/src/main/resources/META-INF/native-image/com.google.cloud.contentwarehouse.v1/reflect-config.json @@ -2708,6 +2708,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1.Document$Annotations", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$Annotations$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$BlobAsset", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$BlobAsset$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1.Document$Builder", "queryAllDeclaredConstructors": true, @@ -2753,6 +2789,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ChunkField", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ChunkField$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ChunkPageFooter", "queryAllDeclaredConstructors": true, @@ -2807,6 +2861,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ImageChunkField", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ImageChunkField$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$TableChunkField", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$TableChunkField$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1.Document$DocumentLayout", "queryAllDeclaredConstructors": true, @@ -2843,6 +2933,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1.Document$DocumentLayout$DocumentLayoutBlock$LayoutImageBlock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$DocumentLayout$DocumentLayoutBlock$LayoutImageBlock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1.Document$DocumentLayout$DocumentLayoutBlock$LayoutListBlock", "queryAllDeclaredConstructors": true, diff --git a/java-dataplex/grpc-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ContentServiceGrpc.java b/java-dataplex/grpc-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ContentServiceGrpc.java index 7d657f076cf9..a087ae2f0103 100644 --- a/java-dataplex/grpc-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ContentServiceGrpc.java +++ b/java-dataplex/grpc-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ContentServiceGrpc.java @@ -15,6 +15,7 @@ */ package com.google.cloud.dataplex.v1; + /** * * diff --git a/java-document-ai/google-cloud-document-ai/src/main/resources/META-INF/native-image/com.google.cloud.documentai.v1/reflect-config.json b/java-document-ai/google-cloud-document-ai/src/main/resources/META-INF/native-image/com.google.cloud.documentai.v1/reflect-config.json index bd2b6e5a3e7d..d90585acc8d1 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/resources/META-INF/native-image/com.google.cloud.documentai.v1/reflect-config.json +++ b/java-document-ai/google-cloud-document-ai/src/main/resources/META-INF/native-image/com.google.cloud.documentai.v1/reflect-config.json @@ -845,6 +845,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1.Document$Annotations", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$Annotations$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$BlobAsset", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$BlobAsset$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1.Document$Builder", "queryAllDeclaredConstructors": true, @@ -890,6 +926,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ChunkField", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ChunkField$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ChunkPageFooter", "queryAllDeclaredConstructors": true, @@ -944,6 +998,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ImageChunkField", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$ImageChunkField$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$TableChunkField", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$ChunkedDocument$Chunk$TableChunkField$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1.Document$DocumentLayout", "queryAllDeclaredConstructors": true, @@ -980,6 +1070,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1.Document$DocumentLayout$DocumentLayoutBlock$LayoutImageBlock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1.Document$DocumentLayout$DocumentLayoutBlock$LayoutImageBlock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1.Document$DocumentLayout$DocumentLayoutBlock$LayoutListBlock", "queryAllDeclaredConstructors": true, diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java index 18cb03dfa200..23b7a88edef7 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Document.java @@ -64,6 +64,7 @@ private Document() { entityRelations_ = java.util.Collections.emptyList(); textChanges_ = java.util.Collections.emptyList(); revisions_ = java.util.Collections.emptyList(); + blobAssets_ = java.util.Collections.emptyList(); entitiesRevisions_ = java.util.Collections.emptyList(); entitiesRevisionId_ = ""; } @@ -4660,7 +4661,7 @@ com.google.cloud.documentai.v1.Document.Page.ParagraphOrBuilder getParagraphsOrB * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -4674,7 +4675,7 @@ com.google.cloud.documentai.v1.Document.Page.ParagraphOrBuilder getParagraphsOrB * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -4687,7 +4688,7 @@ com.google.cloud.documentai.v1.Document.Page.ParagraphOrBuilder getParagraphsOrB * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -4700,7 +4701,7 @@ com.google.cloud.documentai.v1.Document.Page.ParagraphOrBuilder getParagraphsOrB * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -4714,7 +4715,7 @@ com.google.cloud.documentai.v1.Document.Page.ParagraphOrBuilder getParagraphsOrB * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -5013,7 +5014,7 @@ com.google.cloud.documentai.v1.Document.Page.FormFieldOrBuilder getFormFieldsOrB * * * @deprecated google.cloud.documentai.v1.Document.Page.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=548 + * google/cloud/documentai/v1/document.proto;l=549 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -5030,7 +5031,7 @@ com.google.cloud.documentai.v1.Document.Page.FormFieldOrBuilder getFormFieldsOrB * * * @deprecated google.cloud.documentai.v1.Document.Page.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=548 + * google/cloud/documentai/v1/document.proto;l=549 * @return The provenance. */ @java.lang.Deprecated @@ -7808,9 +7809,9 @@ public interface LayoutOrBuilder *
        * Confidence of the current
        * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within
-       * context of the object this layout is for. e.g. confidence can be for a
-       * single token, a table, a visual element, etc. depending on context.
-       * Range `[0, 1]`.
+       * context of the object this layout is for. For example, confidence can
+       * be for a single token, a table, a visual element, etc. depending on
+       * context. Range `[0, 1]`.
        * 
* * float confidence = 2; @@ -8229,9 +8230,9 @@ public com.google.cloud.documentai.v1.Document.TextAnchorOrBuilder getTextAnchor *
        * Confidence of the current
        * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within
-       * context of the object this layout is for. e.g. confidence can be for a
-       * single token, a table, a visual element, etc. depending on context.
-       * Range `[0, 1]`.
+       * context of the object this layout is for. For example, confidence can
+       * be for a single token, a table, a visual element, etc. depending on
+       * context. Range `[0, 1]`.
        * 
* * float confidence = 2; @@ -8974,9 +8975,9 @@ public com.google.cloud.documentai.v1.Document.TextAnchor.Builder getTextAnchorB *
          * Confidence of the current
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within
-         * context of the object this layout is for. e.g. confidence can be for a
-         * single token, a table, a visual element, etc. depending on context.
-         * Range `[0, 1]`.
+         * context of the object this layout is for. For example, confidence can
+         * be for a single token, a table, a visual element, etc. depending on
+         * context. Range `[0, 1]`.
          * 
* * float confidence = 2; @@ -8994,9 +8995,9 @@ public float getConfidence() { *
          * Confidence of the current
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within
-         * context of the object this layout is for. e.g. confidence can be for a
-         * single token, a table, a visual element, etc. depending on context.
-         * Range `[0, 1]`.
+         * context of the object this layout is for. For example, confidence can
+         * be for a single token, a table, a visual element, etc. depending on
+         * context. Range `[0, 1]`.
          * 
* * float confidence = 2; @@ -9018,9 +9019,9 @@ public Builder setConfidence(float value) { *
          * Confidence of the current
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within
-         * context of the object this layout is for. e.g. confidence can be for a
-         * single token, a table, a visual element, etc. depending on context.
-         * Range `[0, 1]`.
+         * context of the object this layout is for. For example, confidence can
+         * be for a single token, a table, a visual element, etc. depending on
+         * context. Range `[0, 1]`.
          * 
* * float confidence = 2; @@ -9525,7 +9526,7 @@ public interface BlockOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.Page.Block.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=207 + * google/cloud/documentai/v1/document.proto;l=208 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -9542,7 +9543,7 @@ public interface BlockOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.Page.Block.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=207 + * google/cloud/documentai/v1/document.proto;l=208 * @return The provenance. */ @java.lang.Deprecated @@ -9774,7 +9775,7 @@ public com.google.cloud.documentai.v1.Document.Page.DetectedLanguage getDetected * * * @deprecated google.cloud.documentai.v1.Document.Page.Block.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=207 + * google/cloud/documentai/v1/document.proto;l=208 * @return Whether the provenance field is set. */ @java.lang.Override @@ -9794,7 +9795,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Block.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=207 + * google/cloud/documentai/v1/document.proto;l=208 * @return The provenance. */ @java.lang.Override @@ -10919,7 +10920,7 @@ public Builder removeDetectedLanguages(int index) { * * * @deprecated google.cloud.documentai.v1.Document.Page.Block.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=207 + * google/cloud/documentai/v1/document.proto;l=208 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -10938,7 +10939,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Block.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=207 + * google/cloud/documentai/v1/document.proto;l=208 * @return The provenance. */ @java.lang.Deprecated @@ -11296,7 +11297,7 @@ public interface ParagraphOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.Page.Paragraph.provenance is deprecated. - * See google/cloud/documentai/v1/document.proto;l=220 + * See google/cloud/documentai/v1/document.proto;l=221 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -11313,7 +11314,7 @@ public interface ParagraphOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.Page.Paragraph.provenance is deprecated. - * See google/cloud/documentai/v1/document.proto;l=220 + * See google/cloud/documentai/v1/document.proto;l=221 * @return The provenance. */ @java.lang.Deprecated @@ -11544,7 +11545,7 @@ public com.google.cloud.documentai.v1.Document.Page.DetectedLanguage getDetected * * * @deprecated google.cloud.documentai.v1.Document.Page.Paragraph.provenance is deprecated. - * See google/cloud/documentai/v1/document.proto;l=220 + * See google/cloud/documentai/v1/document.proto;l=221 * @return Whether the provenance field is set. */ @java.lang.Override @@ -11564,7 +11565,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Paragraph.provenance is deprecated. - * See google/cloud/documentai/v1/document.proto;l=220 + * See google/cloud/documentai/v1/document.proto;l=221 * @return The provenance. */ @java.lang.Override @@ -12688,7 +12689,7 @@ public Builder removeDetectedLanguages(int index) { * * * @deprecated google.cloud.documentai.v1.Document.Page.Paragraph.provenance is deprecated. - * See google/cloud/documentai/v1/document.proto;l=220 + * See google/cloud/documentai/v1/document.proto;l=221 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -12707,7 +12708,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Paragraph.provenance is deprecated. - * See google/cloud/documentai/v1/document.proto;l=220 + * See google/cloud/documentai/v1/document.proto;l=221 * @return The provenance. */ @java.lang.Deprecated @@ -13065,7 +13066,7 @@ public interface LineOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.Page.Line.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=234 + * google/cloud/documentai/v1/document.proto;l=235 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -13082,7 +13083,7 @@ public interface LineOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.Page.Line.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=234 + * google/cloud/documentai/v1/document.proto;l=235 * @return The provenance. */ @java.lang.Deprecated @@ -13314,7 +13315,7 @@ public com.google.cloud.documentai.v1.Document.Page.DetectedLanguage getDetected * * * @deprecated google.cloud.documentai.v1.Document.Page.Line.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=234 + * google/cloud/documentai/v1/document.proto;l=235 * @return Whether the provenance field is set. */ @java.lang.Override @@ -13334,7 +13335,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Line.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=234 + * google/cloud/documentai/v1/document.proto;l=235 * @return The provenance. */ @java.lang.Override @@ -14459,7 +14460,7 @@ public Builder removeDetectedLanguages(int index) { * * * @deprecated google.cloud.documentai.v1.Document.Page.Line.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=234 + * google/cloud/documentai/v1/document.proto;l=235 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -14478,7 +14479,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Line.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=234 + * google/cloud/documentai/v1/document.proto;l=235 * @return The provenance. */ @java.lang.Deprecated @@ -14880,7 +14881,7 @@ public interface TokenOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.Page.Token.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=326 + * google/cloud/documentai/v1/document.proto;l=327 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -14897,7 +14898,7 @@ public interface TokenOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.Page.Token.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=326 + * google/cloud/documentai/v1/document.proto;l=327 * @return The provenance. */ @java.lang.Deprecated @@ -18650,7 +18651,7 @@ public com.google.cloud.documentai.v1.Document.Page.DetectedLanguage getDetected * * * @deprecated google.cloud.documentai.v1.Document.Page.Token.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=326 + * google/cloud/documentai/v1/document.proto;l=327 * @return Whether the provenance field is set. */ @java.lang.Override @@ -18670,7 +18671,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Token.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=326 + * google/cloud/documentai/v1/document.proto;l=327 * @return The provenance. */ @java.lang.Override @@ -20139,7 +20140,7 @@ public Builder removeDetectedLanguages(int index) { * * * @deprecated google.cloud.documentai.v1.Document.Page.Token.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=326 + * google/cloud/documentai/v1/document.proto;l=327 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -20158,7 +20159,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Token.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=326 + * google/cloud/documentai/v1/document.proto;l=327 * @return The provenance. */ @java.lang.Deprecated @@ -22145,8 +22146,8 @@ public interface VisualElementOrBuilder * * *
-     * Detected non-text visual elements e.g. checkbox, signature etc. on the
-     * page.
+     * Detected non-text visual elements, for example, checkbox, signature etc.
+     * on the page.
      * 
* * Protobuf type {@code google.cloud.documentai.v1.Document.Page.VisualElement} @@ -22588,8 +22589,8 @@ protected Builder newBuilderForType( * * *
-       * Detected non-text visual elements e.g. checkbox, signature etc. on the
-       * page.
+       * Detected non-text visual elements, for example, checkbox, signature etc.
+       * on the page.
        * 
* * Protobuf type {@code google.cloud.documentai.v1.Document.Page.VisualElement} @@ -23886,7 +23887,7 @@ com.google.cloud.documentai.v1.Document.Page.Table.TableRowOrBuilder getBodyRows * * * @deprecated google.cloud.documentai.v1.Document.Page.Table.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=395 + * google/cloud/documentai/v1/document.proto;l=396 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -23903,7 +23904,7 @@ com.google.cloud.documentai.v1.Document.Page.Table.TableRowOrBuilder getBodyRows * * * @deprecated google.cloud.documentai.v1.Document.Page.Table.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=395 + * google/cloud/documentai/v1/document.proto;l=396 * @return The provenance. */ @java.lang.Deprecated @@ -26986,7 +26987,7 @@ public com.google.cloud.documentai.v1.Document.Page.DetectedLanguage getDetected * * * @deprecated google.cloud.documentai.v1.Document.Page.Table.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=395 + * google/cloud/documentai/v1/document.proto;l=396 * @return Whether the provenance field is set. */ @java.lang.Override @@ -27006,7 +27007,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Table.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=395 + * google/cloud/documentai/v1/document.proto;l=396 * @return The provenance. */ @java.lang.Override @@ -29078,7 +29079,7 @@ public Builder removeDetectedLanguages(int index) { * * * @deprecated google.cloud.documentai.v1.Document.Page.Table.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=395 + * google/cloud/documentai/v1/document.proto;l=396 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -29097,7 +29098,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.Table.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=395 + * google/cloud/documentai/v1/document.proto;l=396 * @return The provenance. */ @java.lang.Deprecated @@ -29341,7 +29342,7 @@ public interface FormFieldOrBuilder *
        * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
        * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-       * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
        * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -29356,7 +29357,7 @@ public interface FormFieldOrBuilder *
        * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
        * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-       * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
        * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -29371,7 +29372,7 @@ public interface FormFieldOrBuilder *
        * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
        * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-       * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
        * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -29755,7 +29756,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
        * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
        * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-       * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
        * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -29773,7 +29774,7 @@ public boolean hasFieldName() { *
        * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
        * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-       * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
        * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -29793,7 +29794,7 @@ public com.google.cloud.documentai.v1.Document.Page.Layout getFieldName() { *
        * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
        * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-       * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+       * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
        * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -30912,7 +30913,7 @@ public Builder mergeFrom( *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -30929,7 +30930,7 @@ public boolean hasFieldName() { *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -30952,7 +30953,7 @@ public com.google.cloud.documentai.v1.Document.Page.Layout getFieldName() { *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -30977,7 +30978,7 @@ public Builder setFieldName(com.google.cloud.documentai.v1.Document.Page.Layout *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -31000,7 +31001,7 @@ public Builder setFieldName( *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -31031,7 +31032,7 @@ public Builder mergeFieldName(com.google.cloud.documentai.v1.Document.Page.Layou *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -31053,7 +31054,7 @@ public Builder clearFieldName() { *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -31070,7 +31071,7 @@ public com.google.cloud.documentai.v1.Document.Page.Layout.Builder getFieldNameB *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -31092,7 +31093,7 @@ public com.google.cloud.documentai.v1.Document.Page.Layout.Builder getFieldNameB *
          * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the
          * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name.
-         * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
+         * For example, `Address`, `Email`, `Grand total`, `Phone number`, etc.
          * 
* * .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; @@ -37393,7 +37394,7 @@ public com.google.cloud.documentai.v1.Document.Page.TokenOrBuilder getTokensOrBu * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -37410,7 +37411,7 @@ public com.google.cloud.documentai.v1.Document.Page.TokenOrBuilder getTokensOrBu * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -37428,7 +37429,7 @@ public com.google.cloud.documentai.v1.Document.Page.TokenOrBuilder getTokensOrBu * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -37444,7 +37445,7 @@ public int getVisualElementsCount() { * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -37460,7 +37461,7 @@ public com.google.cloud.documentai.v1.Document.Page.VisualElement getVisualEleme * * *
-     * A list of detected non-text visual elements e.g. checkbox,
+     * A list of detected non-text visual elements, for example, checkbox,
      * signature etc. on the page.
      * 
* @@ -37867,7 +37868,7 @@ public com.google.cloud.documentai.v1.Document.Page.ImageQualityScores getImageQ * * * @deprecated google.cloud.documentai.v1.Document.Page.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=548 + * google/cloud/documentai/v1/document.proto;l=549 * @return Whether the provenance field is set. */ @java.lang.Override @@ -37887,7 +37888,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=548 + * google/cloud/documentai/v1/document.proto;l=549 * @return The provenance. */ @java.lang.Override @@ -42261,7 +42262,7 @@ private void ensureVisualElementsIsMutable() { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42281,7 +42282,7 @@ private void ensureVisualElementsIsMutable() { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42300,7 +42301,7 @@ public int getVisualElementsCount() { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42320,7 +42321,7 @@ public com.google.cloud.documentai.v1.Document.Page.VisualElement getVisualEleme * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42346,7 +42347,7 @@ public Builder setVisualElements( * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42370,7 +42371,7 @@ public Builder setVisualElements( * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42396,7 +42397,7 @@ public Builder addVisualElements( * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42422,7 +42423,7 @@ public Builder addVisualElements( * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42445,7 +42446,7 @@ public Builder addVisualElements( * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42469,7 +42470,7 @@ public Builder addVisualElements( * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42493,7 +42494,7 @@ public Builder addAllVisualElements( * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42515,7 +42516,7 @@ public Builder clearVisualElements() { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42537,7 +42538,7 @@ public Builder removeVisualElements(int index) { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42553,7 +42554,7 @@ public Builder removeVisualElements(int index) { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42573,7 +42574,7 @@ public Builder removeVisualElements(int index) { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42594,7 +42595,7 @@ public Builder removeVisualElements(int index) { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42612,7 +42613,7 @@ public Builder removeVisualElements(int index) { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -42631,7 +42632,7 @@ public Builder removeVisualElements(int index) { * * *
-       * A list of detected non-text visual elements e.g. checkbox,
+       * A list of detected non-text visual elements, for example, checkbox,
        * signature etc. on the page.
        * 
* @@ -44456,7 +44457,7 @@ public Builder clearImageQualityScores() { * * * @deprecated google.cloud.documentai.v1.Document.Page.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=548 + * google/cloud/documentai/v1/document.proto;l=549 * @return Whether the provenance field is set. */ @java.lang.Deprecated @@ -44475,7 +44476,7 @@ public boolean hasProvenance() { * * * @deprecated google.cloud.documentai.v1.Document.Page.provenance is deprecated. See - * google/cloud/documentai/v1/document.proto;l=548 + * google/cloud/documentai/v1/document.proto;l=549 * @return The provenance. */ @java.lang.Deprecated @@ -44765,7 +44766,7 @@ public interface EntityOrBuilder * * *
-     * Required. Entity type from a schema e.g. `Address`.
+     * Required. Entity type from a schema, for example, `Address`.
      * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -44778,7 +44779,7 @@ public interface EntityOrBuilder * * *
-     * Required. Entity type from a schema e.g. `Address`.
+     * Required. Entity type from a schema, for example, `Address`.
      * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -44791,7 +44792,8 @@ public interface EntityOrBuilder * * *
-     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+     * Optional. Text value of the entity, for example, `1600 Amphitheatre
+     * Pkwy`.
      * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -44804,7 +44806,8 @@ public interface EntityOrBuilder * * *
-     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+     * Optional. Text value of the entity, for example, `1600 Amphitheatre
+     * Pkwy`.
      * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -44931,9 +44934,9 @@ public interface EntityOrBuilder * *
      * Optional. Normalized entity value. Absent if the extracted value could
-     * not be converted or the type (e.g. address) is not supported for certain
-     * parsers. This field is also only populated for certain supported document
-     * types.
+     * not be converted or the type (for example, address) is not supported for
+     * certain parsers. This field is also only populated for certain supported
+     * document types.
      * 
* * @@ -44949,9 +44952,9 @@ public interface EntityOrBuilder * *
      * Optional. Normalized entity value. Absent if the extracted value could
-     * not be converted or the type (e.g. address) is not supported for certain
-     * parsers. This field is also only populated for certain supported document
-     * types.
+     * not be converted or the type (for example, address) is not supported for
+     * certain parsers. This field is also only populated for certain supported
+     * document types.
      * 
* * @@ -44967,9 +44970,9 @@ public interface EntityOrBuilder * *
      * Optional. Normalized entity value. Absent if the extracted value could
-     * not be converted or the type (e.g. address) is not supported for certain
-     * parsers. This field is also only populated for certain supported document
-     * types.
+     * not be converted or the type (for example, address) is not supported for
+     * certain parsers. This field is also only populated for certain supported
+     * document types.
      * 
* * @@ -45613,6 +45616,13 @@ public interface NormalizedValueOrBuilder float getFloatValue(); /** + * + * + *
+       * A signature - a graphical representation of a person's name,
+       * often used to sign a document.
+       * 
+ * * bool signature_value = 10; * * @return Whether the signatureValue field is set. @@ -45620,6 +45630,13 @@ public interface NormalizedValueOrBuilder boolean hasSignatureValue(); /** + * + * + *
+       * A signature - a graphical representation of a person's name,
+       * often used to sign a document.
+       * 
+ * * bool signature_value = 10; * * @return The signatureValue. @@ -46137,6 +46154,13 @@ public float getFloatValue() { public static final int SIGNATURE_VALUE_FIELD_NUMBER = 10; /** + * + * + *
+       * A signature - a graphical representation of a person's name,
+       * often used to sign a document.
+       * 
+ * * bool signature_value = 10; * * @return Whether the signatureValue field is set. @@ -46147,6 +46171,13 @@ public boolean hasSignatureValue() { } /** + * + * + *
+       * A signature - a graphical representation of a person's name,
+       * often used to sign a document.
+       * 
+ * * bool signature_value = 10; * * @return The signatureValue. @@ -47944,6 +47975,13 @@ public Builder clearFloatValue() { } /** + * + * + *
+         * A signature - a graphical representation of a person's name,
+         * often used to sign a document.
+         * 
+ * * bool signature_value = 10; * * @return Whether the signatureValue field is set. @@ -47953,6 +47991,13 @@ public boolean hasSignatureValue() { } /** + * + * + *
+         * A signature - a graphical representation of a person's name,
+         * often used to sign a document.
+         * 
+ * * bool signature_value = 10; * * @return The signatureValue. @@ -47965,6 +48010,13 @@ public boolean getSignatureValue() { } /** + * + * + *
+         * A signature - a graphical representation of a person's name,
+         * often used to sign a document.
+         * 
+ * * bool signature_value = 10; * * @param value The signatureValue to set. @@ -47979,6 +48031,13 @@ public Builder setSignatureValue(boolean value) { } /** + * + * + *
+         * A signature - a graphical representation of a person's name,
+         * often used to sign a document.
+         * 
+ * * bool signature_value = 10; * * @return This builder for chaining. @@ -48283,7 +48342,7 @@ public com.google.cloud.documentai.v1.Document.TextAnchorOrBuilder getTextAnchor * * *
-     * Required. Entity type from a schema e.g. `Address`.
+     * Required. Entity type from a schema, for example, `Address`.
      * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -48307,7 +48366,7 @@ public java.lang.String getType() { * * *
-     * Required. Entity type from a schema e.g. `Address`.
+     * Required. Entity type from a schema, for example, `Address`.
      * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -48336,7 +48395,8 @@ public com.google.protobuf.ByteString getTypeBytes() { * * *
-     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+     * Optional. Text value of the entity, for example, `1600 Amphitheatre
+     * Pkwy`.
      * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -48360,7 +48420,8 @@ public java.lang.String getMentionText() { * * *
-     * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+     * Optional. Text value of the entity, for example, `1600 Amphitheatre
+     * Pkwy`.
      * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -48577,9 +48638,9 @@ public com.google.protobuf.ByteString getIdBytes() { * *
      * Optional. Normalized entity value. Absent if the extracted value could
-     * not be converted or the type (e.g. address) is not supported for certain
-     * parsers. This field is also only populated for certain supported document
-     * types.
+     * not be converted or the type (for example, address) is not supported for
+     * certain parsers. This field is also only populated for certain supported
+     * document types.
      * 
* * @@ -48598,9 +48659,9 @@ public boolean hasNormalizedValue() { * *
      * Optional. Normalized entity value. Absent if the extracted value could
-     * not be converted or the type (e.g. address) is not supported for certain
-     * parsers. This field is also only populated for certain supported document
-     * types.
+     * not be converted or the type (for example, address) is not supported for
+     * certain parsers. This field is also only populated for certain supported
+     * document types.
      * 
* * @@ -48621,9 +48682,9 @@ public com.google.cloud.documentai.v1.Document.Entity.NormalizedValue getNormali * *
      * Optional. Normalized entity value. Absent if the extracted value could
-     * not be converted or the type (e.g. address) is not supported for certain
-     * parsers. This field is also only populated for certain supported document
-     * types.
+     * not be converted or the type (for example, address) is not supported for
+     * certain parsers. This field is also only populated for certain supported
+     * document types.
      * 
* * @@ -49767,7 +49828,7 @@ public com.google.cloud.documentai.v1.Document.TextAnchorOrBuilder getTextAnchor * * *
-       * Required. Entity type from a schema e.g. `Address`.
+       * Required. Entity type from a schema, for example, `Address`.
        * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -49790,7 +49851,7 @@ public java.lang.String getType() { * * *
-       * Required. Entity type from a schema e.g. `Address`.
+       * Required. Entity type from a schema, for example, `Address`.
        * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -49813,7 +49874,7 @@ public com.google.protobuf.ByteString getTypeBytes() { * * *
-       * Required. Entity type from a schema e.g. `Address`.
+       * Required. Entity type from a schema, for example, `Address`.
        * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -49835,7 +49896,7 @@ public Builder setType(java.lang.String value) { * * *
-       * Required. Entity type from a schema e.g. `Address`.
+       * Required. Entity type from a schema, for example, `Address`.
        * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -49853,7 +49914,7 @@ public Builder clearType() { * * *
-       * Required. Entity type from a schema e.g. `Address`.
+       * Required. Entity type from a schema, for example, `Address`.
        * 
* * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -49878,7 +49939,8 @@ public Builder setTypeBytes(com.google.protobuf.ByteString value) { * * *
-       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * Optional. Text value of the entity, for example, `1600 Amphitheatre
+       * Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -49901,7 +49963,8 @@ public java.lang.String getMentionText() { * * *
-       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * Optional. Text value of the entity, for example, `1600 Amphitheatre
+       * Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -49924,7 +49987,8 @@ public com.google.protobuf.ByteString getMentionTextBytes() { * * *
-       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * Optional. Text value of the entity, for example, `1600 Amphitheatre
+       * Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -49946,7 +50010,8 @@ public Builder setMentionText(java.lang.String value) { * * *
-       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * Optional. Text value of the entity, for example, `1600 Amphitheatre
+       * Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -49964,7 +50029,8 @@ public Builder clearMentionText() { * * *
-       * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
+       * Optional. Text value of the entity, for example, `1600 Amphitheatre
+       * Pkwy`.
        * 
* * string mention_text = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -50501,9 +50567,9 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -50521,9 +50587,9 @@ public boolean hasNormalizedValue() { * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -50547,9 +50613,9 @@ public com.google.cloud.documentai.v1.Document.Entity.NormalizedValue getNormali * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -50576,9 +50642,9 @@ public Builder setNormalizedValue( * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -50602,9 +50668,9 @@ public Builder setNormalizedValue( * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -50638,9 +50704,9 @@ public Builder mergeNormalizedValue( * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -50663,9 +50729,9 @@ public Builder clearNormalizedValue() { * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -50684,9 +50750,9 @@ public Builder clearNormalizedValue() { * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -50709,9 +50775,9 @@ public Builder clearNormalizedValue() { * *
        * Optional. Normalized entity value. Absent if the extracted value could
-       * not be converted or the type (e.g. address) is not supported for certain
-       * parsers. This field is also only populated for certain supported document
-       * types.
+       * not be converted or the type (for example, address) is not supported for
+       * certain parsers. This field is also only populated for certain supported
+       * document types.
        * 
* * @@ -54777,7 +54843,7 @@ public interface PageRefOrBuilder * * * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is deprecated. - * See google/cloud/documentai/v1/document.proto;l=771 + * See google/cloud/documentai/v1/document.proto;l=775 * @return The layoutId. */ @java.lang.Deprecated @@ -54796,7 +54862,7 @@ public interface PageRefOrBuilder *
* * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is deprecated. - * See google/cloud/documentai/v1/document.proto;l=771 + * See google/cloud/documentai/v1/document.proto;l=775 * @return The bytes for layoutId. */ @java.lang.Deprecated @@ -55318,7 +55384,7 @@ public com.google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType get *
* * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is deprecated. - * See google/cloud/documentai/v1/document.proto;l=771 + * See google/cloud/documentai/v1/document.proto;l=775 * @return The layoutId. */ @java.lang.Override @@ -55348,7 +55414,7 @@ public java.lang.String getLayoutId() { *
* * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is deprecated. - * See google/cloud/documentai/v1/document.proto;l=771 + * See google/cloud/documentai/v1/document.proto;l=775 * @return The bytes for layoutId. */ @java.lang.Override @@ -56085,7 +56151,7 @@ public Builder clearLayoutType() { *
* * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1/document.proto;l=771 + * deprecated. See google/cloud/documentai/v1/document.proto;l=775 * @return The layoutId. */ @java.lang.Deprecated @@ -56114,7 +56180,7 @@ public java.lang.String getLayoutId() { *
* * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1/document.proto;l=771 + * deprecated. See google/cloud/documentai/v1/document.proto;l=775 * @return The bytes for layoutId. */ @java.lang.Deprecated @@ -56143,7 +56209,7 @@ public com.google.protobuf.ByteString getLayoutIdBytes() { *
* * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1/document.proto;l=771 + * deprecated. See google/cloud/documentai/v1/document.proto;l=775 * @param value The layoutId to set. * @return This builder for chaining. */ @@ -56171,7 +56237,7 @@ public Builder setLayoutId(java.lang.String value) { *
* * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1/document.proto;l=771 + * deprecated. See google/cloud/documentai/v1/document.proto;l=775 * @return This builder for chaining. */ @java.lang.Deprecated @@ -56195,7 +56261,7 @@ public Builder clearLayoutId() { *
* * @deprecated google.cloud.documentai.v1.Document.PageAnchor.PageRef.layout_id is - * deprecated. See google/cloud/documentai/v1/document.proto;l=771 + * deprecated. See google/cloud/documentai/v1/document.proto;l=775 * @param value The bytes for layoutId to set. * @return This builder for chaining. */ @@ -57466,7 +57532,7 @@ public interface ProvenanceOrBuilder * int32 revision = 1 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.revision is deprecated. See - * google/cloud/documentai/v1/document.proto;l=839 + * google/cloud/documentai/v1/document.proto;l=843 * @return The revision. */ @java.lang.Deprecated @@ -57483,7 +57549,7 @@ public interface ProvenanceOrBuilder * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=843 + * google/cloud/documentai/v1/document.proto;l=847 * @return The id. */ @java.lang.Deprecated @@ -57969,7 +58035,7 @@ public interface ParentOrBuilder * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=802 + * google/cloud/documentai/v1/document.proto;l=806 * @return The id. */ @java.lang.Deprecated @@ -58076,7 +58142,7 @@ public int getIndex() { * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=802 + * google/cloud/documentai/v1/document.proto;l=806 * @return The id. */ @java.lang.Override @@ -58571,7 +58637,7 @@ public Builder clearIndex() { * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=802 + * google/cloud/documentai/v1/document.proto;l=806 * @return The id. */ @java.lang.Override @@ -58590,7 +58656,7 @@ public int getId() { * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=802 + * google/cloud/documentai/v1/document.proto;l=806 * @param value The id to set. * @return This builder for chaining. */ @@ -58613,7 +58679,7 @@ public Builder setId(int value) { * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.Parent.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=802 + * google/cloud/documentai/v1/document.proto;l=806 * @return This builder for chaining. */ @java.lang.Deprecated @@ -58690,7 +58756,7 @@ public com.google.cloud.documentai.v1.Document.Provenance.Parent getDefaultInsta * int32 revision = 1 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.revision is deprecated. See - * google/cloud/documentai/v1/document.proto;l=839 + * google/cloud/documentai/v1/document.proto;l=843 * @return The revision. */ @java.lang.Override @@ -58713,7 +58779,7 @@ public int getRevision() { * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=843 + * google/cloud/documentai/v1/document.proto;l=847 * @return The id. */ @java.lang.Override @@ -59284,7 +59350,7 @@ public Builder mergeFrom( * int32 revision = 1 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.revision is deprecated. See - * google/cloud/documentai/v1/document.proto;l=839 + * google/cloud/documentai/v1/document.proto;l=843 * @return The revision. */ @java.lang.Override @@ -59303,7 +59369,7 @@ public int getRevision() { * int32 revision = 1 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.revision is deprecated. See - * google/cloud/documentai/v1/document.proto;l=839 + * google/cloud/documentai/v1/document.proto;l=843 * @param value The revision to set. * @return This builder for chaining. */ @@ -59326,7 +59392,7 @@ public Builder setRevision(int value) { * int32 revision = 1 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.revision is deprecated. See - * google/cloud/documentai/v1/document.proto;l=839 + * google/cloud/documentai/v1/document.proto;l=843 * @return This builder for chaining. */ @java.lang.Deprecated @@ -59350,7 +59416,7 @@ public Builder clearRevision() { * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=843 + * google/cloud/documentai/v1/document.proto;l=847 * @return The id. */ @java.lang.Override @@ -59370,7 +59436,7 @@ public int getId() { * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=843 + * google/cloud/documentai/v1/document.proto;l=847 * @param value The id to set. * @return This builder for chaining. */ @@ -59394,7 +59460,7 @@ public Builder setId(int value) { * int32 id = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Provenance.id is deprecated. See - * google/cloud/documentai/v1/document.proto;l=843 + * google/cloud/documentai/v1/document.proto;l=847 * @return This builder for chaining. */ @java.lang.Deprecated @@ -60066,7 +60132,7 @@ public interface RevisionOrBuilder * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @return A list containing the parent. */ @java.lang.Deprecated @@ -60084,7 +60150,7 @@ public interface RevisionOrBuilder * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @return The count of parent. */ @java.lang.Deprecated @@ -60102,7 +60168,7 @@ public interface RevisionOrBuilder * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @param index The index of the element to return. * @return The parent at the given index. */ @@ -60311,7 +60377,7 @@ public interface HumanReviewOrBuilder * * *
-       * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+       * Human review state. For example, `requested`, `succeeded`, `rejected`.
        * 
* * string state = 1; @@ -60324,7 +60390,7 @@ public interface HumanReviewOrBuilder * * *
-       * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+       * Human review state. For example, `requested`, `succeeded`, `rejected`.
        * 
* * string state = 1; @@ -60421,7 +60487,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-       * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+       * Human review state. For example, `requested`, `succeeded`, `rejected`.
        * 
* * string state = 1; @@ -60445,7 +60511,7 @@ public java.lang.String getState() { * * *
-       * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+       * Human review state. For example, `requested`, `succeeded`, `rejected`.
        * 
* * string state = 1; @@ -60867,7 +60933,7 @@ public Builder mergeFrom( * * *
-         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * Human review state. For example, `requested`, `succeeded`, `rejected`.
          * 
* * string state = 1; @@ -60890,7 +60956,7 @@ public java.lang.String getState() { * * *
-         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * Human review state. For example, `requested`, `succeeded`, `rejected`.
          * 
* * string state = 1; @@ -60913,7 +60979,7 @@ public com.google.protobuf.ByteString getStateBytes() { * * *
-         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * Human review state. For example, `requested`, `succeeded`, `rejected`.
          * 
* * string state = 1; @@ -60935,7 +61001,7 @@ public Builder setState(java.lang.String value) { * * *
-         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * Human review state. For example, `requested`, `succeeded`, `rejected`.
          * 
* * string state = 1; @@ -60953,7 +61019,7 @@ public Builder clearState() { * * *
-         * Human review state. e.g. `requested`, `succeeded`, `rejected`.
+         * Human review state. For example, `requested`, `succeeded`, `rejected`.
          * 
* * string state = 1; @@ -61418,7 +61484,7 @@ public com.google.protobuf.ByteString getIdBytes() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @return A list containing the parent. */ @java.lang.Override @@ -61439,7 +61505,7 @@ public java.util.List getParentList() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @return The count of parent. */ @java.lang.Deprecated @@ -61459,7 +61525,7 @@ public int getParentCount() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @param index The index of the element to return. * @return The parent at the given index. */ @@ -62658,7 +62724,7 @@ private void ensureParentIsMutable() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @return A list containing the parent. */ @java.lang.Deprecated @@ -62679,7 +62745,7 @@ public java.util.List getParentList() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @return The count of parent. */ @java.lang.Deprecated @@ -62699,7 +62765,7 @@ public int getParentCount() { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @param index The index of the element to return. * @return The parent at the given index. */ @@ -62720,7 +62786,7 @@ public int getParent(int index) { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @param index The index to set the value at. * @param value The parent to set. * @return This builder for chaining. @@ -62747,7 +62813,7 @@ public Builder setParent(int index, int value) { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @param value The parent to add. * @return This builder for chaining. */ @@ -62773,7 +62839,7 @@ public Builder addParent(int value) { * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @param values The parent to add. * @return This builder for chaining. */ @@ -62798,7 +62864,7 @@ public Builder addAllParent(java.lang.Iterable valu * repeated int32 parent = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1.Document.Revision.parent is deprecated. See - * google/cloud/documentai/v1/document.proto;l=882 + * google/cloud/documentai/v1/document.proto;l=886 * @return This builder for chaining. */ @java.lang.Deprecated @@ -65148,96 +65214,51 @@ public com.google.cloud.documentai.v1.Document.TextChange getDefaultInstanceForT } } - public interface DocumentLayoutOrBuilder + public interface AnnotationsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.DocumentLayout) + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.Annotations) com.google.protobuf.MessageOrBuilder { /** * * *
-     * List of blocks in the document.
-     * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - java.util.List - getBlocksList(); - - /** - * - * - *
-     * List of blocks in the document.
+     * The description of the content with this annotation.
      * 
* - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock getBlocks(int index); - - /** - * - * - *
-     * List of blocks in the document.
-     * 
+ * string description = 1; * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * + * @return The description. */ - int getBlocksCount(); + java.lang.String getDescription(); /** * * *
-     * List of blocks in the document.
+     * The description of the content with this annotation.
      * 
* - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder> - getBlocksOrBuilderList(); - - /** - * - * - *
-     * List of blocks in the document.
-     * 
+ * string description = 1; * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * + * @return The bytes for description. */ - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder - getBlocksOrBuilder(int index); + com.google.protobuf.ByteString getDescriptionBytes(); } /** * * *
-   * Represents the parsed layout of a document as a collection of blocks that
-   * the document is divided into.
+   * Represents the annotation of a block or a chunk.
    * 
* - * Protobuf type {@code google.cloud.documentai.v1.Document.DocumentLayout} + * Protobuf type {@code google.cloud.documentai.v1.Document.Annotations} */ - public static final class DocumentLayout extends com.google.protobuf.GeneratedMessage + public static final class Annotations extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.DocumentLayout) - DocumentLayoutOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.Annotations) + AnnotationsOrBuilder { private static final long serialVersionUID = 0L; static { @@ -65247,132 +65268,785 @@ public static final class DocumentLayout extends com.google.protobuf.GeneratedMe /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "DocumentLayout"); + "Annotations"); } - // Use DocumentLayout.newBuilder() to construct. - private DocumentLayout(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use Annotations.newBuilder() to construct. + private Annotations(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private DocumentLayout() { - blocks_ = java.util.Collections.emptyList(); + private Annotations() { + description_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor; + .internal_static_google_cloud_documentai_v1_Document_Annotations_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_fieldAccessorTable + .internal_static_google_cloud_documentai_v1_Document_Annotations_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.DocumentLayout.class, - com.google.cloud.documentai.v1.Document.DocumentLayout.Builder.class); + com.google.cloud.documentai.v1.Document.Annotations.class, + com.google.cloud.documentai.v1.Document.Annotations.Builder.class); } - public interface DocumentLayoutBlockOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) - com.google.protobuf.MessageOrBuilder { + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+     * The description of the content with this annotation.
+     * 
+ * + * string description = 1; + * + * @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 content with this annotation.
+     * 
+ * + * string description = 1; + * + * @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; + } + } + + 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(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + 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(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + 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.documentai.v1.Document.Annotations)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.Annotations other = + (com.google.cloud.documentai.v1.Document.Annotations) obj; + + if (!getDescription().equals(other.getDescription())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.Annotations parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.Annotations 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.documentai.v1.Document.Annotations parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.Annotations 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.documentai.v1.Document.Annotations parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.Annotations parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.Annotations parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.Annotations 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.documentai.v1.Document.Annotations parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.Annotations 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.documentai.v1.Document.Annotations parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.Annotations 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.documentai.v1.Document.Annotations 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 annotation of a block or a chunk.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.Annotations} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.Annotations) + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_Annotations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_Annotations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.Annotations.class, + com.google.cloud.documentai.v1.Document.Annotations.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1.Document.Annotations.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_Annotations_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Annotations getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Annotations build() { + com.google.cloud.documentai.v1.Document.Annotations result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Annotations buildPartial() { + com.google.cloud.documentai.v1.Document.Annotations result = + new com.google.cloud.documentai.v1.Document.Annotations(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.documentai.v1.Document.Annotations result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1.Document.Annotations) { + return mergeFrom((com.google.cloud.documentai.v1.Document.Annotations) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1.Document.Annotations other) { + if (other == com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + 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: + { + description_ = 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 description_ = ""; /** * * *
-       * Block consisting of text content.
+       * The description of the content with this annotation.
        * 
* - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * + * string description = 1; * - * @return Whether the textBlock field is set. + * @return The description. */ - boolean hasTextBlock(); + 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; + } + } /** * * *
-       * Block consisting of text content.
+       * The description of the content with this annotation.
        * 
* - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * + * string description = 1; * - * @return The textBlock. + * @return The bytes for description. */ - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock - getTextBlock(); + 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; + } + } /** * * *
-       * Block consisting of text content.
+       * The description of the content with this annotation.
        * 
* - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * + * string description = 1; + * + * @param value The description to set. + * @return This builder for chaining. */ - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlockOrBuilder - getTextBlockOrBuilder(); + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } /** * * *
-       * Block consisting of table content/structure.
+       * The description of the content with this annotation.
        * 
* - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * + * string description = 1; * - * @return Whether the tableBlock field is set. + * @return This builder for chaining. */ - boolean hasTableBlock(); + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } /** * * *
-       * Block consisting of table content/structure.
+       * The description of the content with this annotation.
        * 
* - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * + * string description = 1; * - * @return The tableBlock. + * @param value The bytes for description to set. + * @return This builder for chaining. */ - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock - getTableBlock(); + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
-       * Block consisting of table content/structure.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - */ - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlockOrBuilder - getTableBlockOrBuilder(); + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.Annotations) + } - /** - * + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.Annotations) + private static final com.google.cloud.documentai.v1.Document.Annotations DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.Document.Annotations(); + } + + public static com.google.cloud.documentai.v1.Document.Annotations getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Annotations parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.Annotations getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DocumentLayoutOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.DocumentLayout) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + java.util.List + getBlocksList(); + + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock getBlocks(int index); + + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + int getBlocksCount(); + + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList(); + + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index); + } + + /** + * + * + *
+   * Represents the parsed layout of a document as a collection of blocks that
+   * the document is divided into.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.DocumentLayout} + */ + public static final class DocumentLayout extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.DocumentLayout) + DocumentLayoutOrBuilder { + 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= */ "", + "DocumentLayout"); + } + + // Use DocumentLayout.newBuilder() to construct. + private DocumentLayout(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DocumentLayout() { + blocks_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.DocumentLayout.class, + com.google.cloud.documentai.v1.Document.DocumentLayout.Builder.class); + } + + public interface DocumentLayoutBlockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return Whether the textBlock field is set. + */ + boolean hasTextBlock(); + + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return The textBlock. + */ + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock + getTextBlock(); + + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder + getTextBlockOrBuilder(); + + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return Whether the tableBlock field is set. + */ + boolean hasTableBlock(); + + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return The tableBlock. + */ + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock + getTableBlock(); + + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder + getTableBlockOrBuilder(); + + /** + * * *
        * Block consisting of list content/structure.
@@ -65417,6 +66091,52 @@ public interface DocumentLayoutBlockOrBuilder
               .LayoutListBlockOrBuilder
           getListBlockOrBuilder();
 
+      /**
+       *
+       *
+       * 
+       * Block consisting of image content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + * + * @return Whether the imageBlock field is set. + */ + boolean hasImageBlock(); + + /** + * + * + *
+       * Block consisting of image content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + * + * @return The imageBlock. + */ + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + getImageBlock(); + + /** + * + * + *
+       * Block consisting of image content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + */ + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlockOrBuilder + getImageBlockOrBuilder(); + /** * * @@ -66403,6 +67123,43 @@ com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock getBl */ com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder getBlocksOrBuilder(int index); + + /** + * + * + *
+         * Annotation of the text block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + boolean hasAnnotations(); + + /** + * + * + *
+         * Annotation of the text block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + com.google.cloud.documentai.v1.Document.Annotations getAnnotations(); + + /** + * + * + *
+         * Annotation of the text block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder getAnnotationsOrBuilder(); } /** @@ -66459,6 +67216,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .LayoutTextBlock.Builder.class); } + private int bitField0_; public static final int TEXT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -66669,6 +67427,60 @@ public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBloc return blocks_.get(index); } + public static final int ANNOTATIONS_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + + /** + * + * + *
+         * Annotation of the text block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + @java.lang.Override + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+         * Annotation of the text block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + + /** + * + * + *
+         * Annotation of the text block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -66693,6 +67505,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < blocks_.size(); i++) { output.writeMessage(3, blocks_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getAnnotations()); + } getUnknownFields().writeTo(output); } @@ -66711,6 +67526,9 @@ public int getSerializedSize() { for (int i = 0; i < blocks_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, blocks_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAnnotations()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -66736,6 +67554,10 @@ public boolean equals(final java.lang.Object obj) { if (!getText().equals(other.getText())) return false; if (!getType().equals(other.getType())) return false; if (!getBlocksList().equals(other.getBlocksList())) return false; + if (hasAnnotations() != other.hasAnnotations()) return false; + if (hasAnnotations()) { + if (!getAnnotations().equals(other.getAnnotations())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -66755,6 +67577,10 @@ public int hashCode() { hash = (37 * hash) + BLOCKS_FIELD_NUMBER; hash = (53 * hash) + getBlocksList().hashCode(); } + if (hasAnnotations()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotations().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -66916,10 +67742,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock.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) { + internalGetBlocksFieldBuilder(); + internalGetAnnotationsFieldBuilder(); + } } @java.lang.Override @@ -66935,6 +67771,11 @@ public Builder clear() { blocksBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } return this; } @@ -67008,6 +67849,13 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000002) != 0)) { result.type_ = type_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.annotations_ = + annotationsBuilder_ == null ? annotations_ : annotationsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -67070,6 +67918,9 @@ public Builder mergeFrom( } } } + if (other.hasAnnotations()) { + mergeAnnotations(other.getAnnotations()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -67123,6 +67974,13 @@ public Builder mergeFrom( } break; } // case 26 + case 34: + { + input.readMessage( + internalGetAnnotationsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -67836,6 +68694,205 @@ public Builder removeBlocks(int index) { return blocksBuilder_; } + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + if (annotationsBuilder_ == null) { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } else { + return annotationsBuilder_.getMessage(); + } + } + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder setAnnotations(com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotations_ = value; + } else { + annotationsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder setAnnotations( + com.google.cloud.documentai.v1.Document.Annotations.Builder builderForValue) { + if (annotationsBuilder_ == null) { + annotations_ = builderForValue.build(); + } else { + annotationsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder mergeAnnotations( + com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && annotations_ != null + && annotations_ + != com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance()) { + getAnnotationsBuilder().mergeFrom(value); + } else { + annotations_ = value; + } + } else { + annotationsBuilder_.mergeFrom(value); + } + if (annotations_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000008); + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public com.google.cloud.documentai.v1.Document.Annotations.Builder + getAnnotationsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetAnnotationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilder(); + } else { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + } + + /** + * + * + *
+           * Annotation of the text block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + internalGetAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder>( + getAnnotations(), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock) } @@ -68076,6 +69133,43 @@ public interface LayoutTableBlockOrBuilder * @return The bytes for caption. */ com.google.protobuf.ByteString getCaptionBytes(); + + /** + * + * + *
+         * Annotation of the table block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + boolean hasAnnotations(); + + /** + * + * + *
+         * Annotation of the table block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + com.google.cloud.documentai.v1.Document.Annotations getAnnotations(); + + /** + * + * + *
+         * Annotation of the table block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder getAnnotationsOrBuilder(); } /** @@ -68132,6 +69226,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .LayoutTableBlock.Builder.class); } + private int bitField0_; public static final int HEADER_ROWS_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -68383,6 +69478,60 @@ public com.google.protobuf.ByteString getCaptionBytes() { } } + public static final int ANNOTATIONS_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + + /** + * + * + *
+         * Annotation of the table block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + @java.lang.Override + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+         * Annotation of the table block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + + /** + * + * + *
+         * Annotation of the table block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -68407,6 +69556,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessage.isStringEmpty(caption_)) { com.google.protobuf.GeneratedMessage.writeString(output, 3, caption_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getAnnotations()); + } getUnknownFields().writeTo(output); } @@ -68425,6 +69577,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(caption_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(3, caption_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAnnotations()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -68451,6 +69606,10 @@ public boolean equals(final java.lang.Object obj) { if (!getHeaderRowsList().equals(other.getHeaderRowsList())) return false; if (!getBodyRowsList().equals(other.getBodyRowsList())) return false; if (!getCaption().equals(other.getCaption())) return false; + if (hasAnnotations() != other.hasAnnotations()) return false; + if (hasAnnotations()) { + if (!getAnnotations().equals(other.getAnnotations())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -68472,6 +69631,10 @@ public int hashCode() { } hash = (37 * hash) + CAPTION_FIELD_NUMBER; hash = (53 * hash) + getCaption().hashCode(); + if (hasAnnotations()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotations().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -68633,10 +69796,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock.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) { + internalGetHeaderRowsFieldBuilder(); + internalGetBodyRowsFieldBuilder(); + internalGetAnnotationsFieldBuilder(); + } } @java.lang.Override @@ -68658,6 +69832,11 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000002); caption_ = ""; + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } return this; } @@ -68737,6 +69916,13 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000004) != 0)) { result.caption_ = caption_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.annotations_ = + annotationsBuilder_ == null ? annotations_ : annotationsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -68821,6 +70007,9 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } + if (other.hasAnnotations()) { + mergeAnnotations(other.getAnnotations()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -68887,6 +70076,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + input.readMessage( + internalGetAnnotationsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -69949,6 +71145,205 @@ public Builder setCaptionBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + if (annotationsBuilder_ == null) { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } else { + return annotationsBuilder_.getMessage(); + } + } + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder setAnnotations(com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotations_ = value; + } else { + annotationsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder setAnnotations( + com.google.cloud.documentai.v1.Document.Annotations.Builder builderForValue) { + if (annotationsBuilder_ == null) { + annotations_ = builderForValue.build(); + } else { + annotationsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder mergeAnnotations( + com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && annotations_ != null + && annotations_ + != com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance()) { + getAnnotationsBuilder().mergeFrom(value); + } else { + annotations_ = value; + } + } else { + annotationsBuilder_.mergeFrom(value); + } + if (annotations_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000008); + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public com.google.cloud.documentai.v1.Document.Annotations.Builder + getAnnotationsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetAnnotationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilder(); + } else { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + } + + /** + * + * + *
+           * Annotation of the table block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + internalGetAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder>( + getAnnotations(), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock) } @@ -75185,4663 +76580,4494 @@ public com.google.protobuf.Parser getParserForType() { } } - private int bitField0_; - private int blockCase_ = 0; + public interface LayoutImageBlockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private java.lang.Object block_; + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the blobAssetId field is set. + */ + boolean hasBlobAssetId(); - public enum BlockCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TEXT_BLOCK(2), - TABLE_BLOCK(3), - LIST_BLOCK(4), - BLOCK_NOT_SET(0); - private final int value; + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The blobAssetId. + */ + java.lang.String getBlobAssetId(); - private BlockCase(int value) { - this.value = value; - } + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for blobAssetId. + */ + com.google.protobuf.ByteString getBlobAssetIdBytes(); /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the gcsUri field is set. */ - @java.lang.Deprecated - public static BlockCase valueOf(int value) { - return forNumber(value); - } + boolean hasGcsUri(); - public static BlockCase forNumber(int value) { - switch (value) { - case 2: - return TEXT_BLOCK; - case 3: - return TABLE_BLOCK; - case 4: - return LIST_BLOCK; - case 0: - return BLOCK_NOT_SET; - default: - return null; - } - } + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); - public int getNumber() { - return this.value; - } - }; + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); - public BlockCase getBlockCase() { - return BlockCase.forNumber(blockCase_); - } + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the dataUri field is set. + */ + boolean hasDataUri(); - public static final int TEXT_BLOCK_FIELD_NUMBER = 2; + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataUri. + */ + java.lang.String getDataUri(); - /** - * - * - *
-       * Block consisting of text content.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - * - * @return Whether the textBlock field is set. - */ - @java.lang.Override - public boolean hasTextBlock() { - return blockCase_ == 2; - } + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataUri. + */ + com.google.protobuf.ByteString getDataUriBytes(); - /** - * - * - *
-       * Block consisting of text content.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - * - * @return The textBlock. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock - getTextBlock() { - if (blockCase_ == 2) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock) - block_; - } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.getDefaultInstance(); - } + /** + * + * + *
+         * Mime type of the image. An IANA published [media type (MIME type)]
+         * (https://www.iana.org/assignments/media-types/media-types.xhtml).
+         * 
+ * + * string mime_type = 1; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); - /** - * - * - *
-       * Block consisting of text content.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlockOrBuilder - getTextBlockOrBuilder() { - if (blockCase_ == 2) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock) - block_; - } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.getDefaultInstance(); - } + /** + * + * + *
+         * Mime type of the image. An IANA published [media type (MIME type)]
+         * (https://www.iana.org/assignments/media-types/media-types.xhtml).
+         * 
+ * + * string mime_type = 1; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); - public static final int TABLE_BLOCK_FIELD_NUMBER = 3; + /** + * + * + *
+         * Text extracted from the image using OCR or alt text describing the
+         * image.
+         * 
+ * + * string image_text = 2; + * + * @return The imageText. + */ + java.lang.String getImageText(); - /** - * - * - *
-       * Block consisting of table content/structure.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - * - * @return Whether the tableBlock field is set. - */ - @java.lang.Override - public boolean hasTableBlock() { - return blockCase_ == 3; - } + /** + * + * + *
+         * Text extracted from the image using OCR or alt text describing the
+         * image.
+         * 
+ * + * string image_text = 2; + * + * @return The bytes for imageText. + */ + com.google.protobuf.ByteString getImageTextBytes(); - /** - * - * - *
-       * Block consisting of table content/structure.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - * - * @return The tableBlock. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock - getTableBlock() { - if (blockCase_ == 3) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock) - block_; - } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.getDefaultInstance(); + /** + * + * + *
+         * Annotation of the image block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + * + * @return Whether the annotations field is set. + */ + boolean hasAnnotations(); + + /** + * + * + *
+         * Annotation of the image block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + * + * @return The annotations. + */ + com.google.cloud.documentai.v1.Document.Annotations getAnnotations(); + + /** + * + * + *
+         * Annotation of the image block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder getAnnotationsOrBuilder(); + + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + .ImageSourceCase + getImageSourceCase(); } /** * * *
-       * Block consisting of table content/structure.
+       * Represents an image type block.
        * 
* - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock} */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlockOrBuilder - getTableBlockOrBuilder() { - if (blockCase_ == 3) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock) - block_; + public static final class LayoutImageBlock extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock) + LayoutImageBlockOrBuilder { + 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= */ "", + "LayoutImageBlock"); } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.getDefaultInstance(); - } - public static final int LIST_BLOCK_FIELD_NUMBER = 4; + // Use LayoutImageBlock.newBuilder() to construct. + private LayoutImageBlock(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
-       * Block consisting of list content/structure.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - * - * @return Whether the listBlock field is set. - */ - @java.lang.Override - public boolean hasListBlock() { - return blockCase_ == 4; - } + private LayoutImageBlock() { + mimeType_ = ""; + imageText_ = ""; + } - /** - * - * - *
-       * Block consisting of list content/structure.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - * - * @return The listBlock. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock - getListBlock() { - if (blockCase_ == 4) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock) - block_; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_descriptor; } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.getDefaultInstance(); - } - /** - * - * - *
-       * Block consisting of list content/structure.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlockOrBuilder - getListBlockOrBuilder() { - if (blockCase_ == 4) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock) - block_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.class, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.Builder.class); } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.getDefaultInstance(); - } - - public static final int BLOCK_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object blockId_ = ""; - /** - * - * - *
-       * ID of the block.
-       * 
- * - * string block_id = 1; - * - * @return The blockId. - */ - @java.lang.Override - public java.lang.String getBlockId() { - java.lang.Object ref = blockId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - blockId_ = s; - return s; - } - } + private int bitField0_; + private int imageSourceCase_ = 0; - /** - * - * - *
-       * ID of the block.
-       * 
- * - * string block_id = 1; - * - * @return The bytes for blockId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBlockIdBytes() { - java.lang.Object ref = blockId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - blockId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @SuppressWarnings("serial") + private java.lang.Object imageSource_; - public static final int PAGE_SPAN_FIELD_NUMBER = 5; - private com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan - pageSpan_; + public enum ImageSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BLOB_ASSET_ID(4), + GCS_URI(5), + DATA_URI(6), + IMAGESOURCE_NOT_SET(0); + private final int value; - /** - * - * - *
-       * Page span of the block.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - * - * @return Whether the pageSpan field is set. - */ - @java.lang.Override - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000001) != 0); - } + private ImageSourceCase(int value) { + this.value = value; + } - /** - * - * - *
-       * Page span of the block.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - * - * @return The pageSpan. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan - getPageSpan() { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.getDefaultInstance() - : pageSpan_; - } + /** + * @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 ImageSourceCase valueOf(int value) { + return forNumber(value); + } - /** - * - * - *
-       * Page span of the block.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpanOrBuilder - getPageSpanOrBuilder() { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.getDefaultInstance() - : pageSpan_; - } + public static ImageSourceCase forNumber(int value) { + switch (value) { + case 4: + return BLOB_ASSET_ID; + case 5: + return GCS_URI; + case 6: + return DATA_URI; + case 0: + return IMAGESOURCE_NOT_SET; + default: + return null; + } + } - public static final int BOUNDING_BOX_FIELD_NUMBER = 6; - private com.google.cloud.documentai.v1.BoundingPoly boundingBox_; + public int getNumber() { + return this.value; + } + }; - /** - * - * - *
-       * Identifies the bounding box for the block.
-       * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - * - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return ((bitField0_ & 0x00000002) != 0); - } + public ImageSourceCase getImageSourceCase() { + return ImageSourceCase.forNumber(imageSourceCase_); + } - /** - * - * - *
-       * Identifies the bounding box for the block.
-       * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - * - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.BoundingPoly getBoundingBox() { - return boundingBox_ == null - ? com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } + public static final int BLOB_ASSET_ID_FIELD_NUMBER = 4; - /** - * - * - *
-       * Identifies the bounding box for the block.
-       * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - @java.lang.Override - public com.google.cloud.documentai.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return boundingBox_ == null - ? com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the blobAssetId field is set. + */ + public boolean hasBlobAssetId() { + return imageSourceCase_ == 4; + } - private byte memoizedIsInitialized = -1; + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The blobAssetId. + */ + public java.lang.String getBlobAssetId() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 4) { + ref = imageSource_; + } + if (ref instanceof java.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 (imageSourceCase_ == 4) { + imageSource_ = s; + } + return s; + } + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for blobAssetId. + */ + public com.google.protobuf.ByteString getBlobAssetIdBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 4) { + ref = imageSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 4) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - memoizedIsInitialized = 1; - return true; - } + public static final int GCS_URI_FIELD_NUMBER = 5; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(blockId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, blockId_); - } - if (blockCase_ == 2) { - output.writeMessage( - 2, - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock) - block_); - } - if (blockCase_ == 3) { - output.writeMessage( - 3, - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock) - block_); - } - if (blockCase_ == 4) { - output.writeMessage( - 4, - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock) - block_); + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the gcsUri field is set. + */ + public boolean hasGcsUri() { + return imageSourceCase_ == 5; } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getPageSpan()); + + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 5) { + ref = imageSource_; + } + if (ref instanceof java.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 (imageSourceCase_ == 5) { + imageSource_ = s; + } + return s; + } } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(6, getBoundingBox()); + + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 5) { + ref = imageSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 5) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int DATA_URI_FIELD_NUMBER = 6; - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(blockId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, blockId_); - } - if (blockCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock) - block_); - } - if (blockCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock) - block_); + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the dataUri field is set. + */ + public boolean hasDataUri() { + return imageSourceCase_ == 6; } - if (blockCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock) - block_); + + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataUri. + */ + public java.lang.String getDataUri() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 6) { + ref = imageSource_; + } + if (ref instanceof java.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 (imageSourceCase_ == 6) { + imageSource_ = s; + } + return s; + } } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPageSpan()); + + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataUri. + */ + public com.google.protobuf.ByteString getDataUriBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 6) { + ref = imageSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 6) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBoundingBox()); + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
+         * Mime type of the image. An IANA published [media type (MIME type)]
+         * (https://www.iana.org/assignments/media-types/media-types.xhtml).
+         * 
+ * + * string mime_type = 1; + * + * @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; + } } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + /** + * + * + *
+         * Mime type of the image. An IANA published [media type (MIME type)]
+         * (https://www.iana.org/assignments/media-types/media-types.xhtml).
+         * 
+ * + * string mime_type = 1; + * + * @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; + } } - if (!(obj - instanceof - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock)) { - return super.equals(obj); + + public static final int IMAGE_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageText_ = ""; + + /** + * + * + *
+         * Text extracted from the image using OCR or alt text describing the
+         * image.
+         * 
+ * + * string image_text = 2; + * + * @return The imageText. + */ + @java.lang.Override + public java.lang.String getImageText() { + java.lang.Object ref = imageText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageText_ = s; + return s; + } } - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock other = - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) obj; - if (!getBlockId().equals(other.getBlockId())) return false; - if (hasPageSpan() != other.hasPageSpan()) return false; - if (hasPageSpan()) { - if (!getPageSpan().equals(other.getPageSpan())) return false; + /** + * + * + *
+         * Text extracted from the image using OCR or alt text describing the
+         * image.
+         * 
+ * + * string image_text = 2; + * + * @return The bytes for imageText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageTextBytes() { + java.lang.Object ref = imageText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox().equals(other.getBoundingBox())) return false; - } - if (!getBlockCase().equals(other.getBlockCase())) return false; - switch (blockCase_) { - case 2: - if (!getTextBlock().equals(other.getTextBlock())) return false; - break; - case 3: - if (!getTableBlock().equals(other.getTableBlock())) return false; - break; - case 4: - if (!getListBlock().equals(other.getListBlock())) 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) + BLOCK_ID_FIELD_NUMBER; - hash = (53 * hash) + getBlockId().hashCode(); - if (hasPageSpan()) { - hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; - hash = (53 * hash) + getPageSpan().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); + public static final int ANNOTATIONS_FIELD_NUMBER = 3; + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + + /** + * + * + *
+         * Annotation of the image block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + * + * @return Whether the annotations field is set. + */ + @java.lang.Override + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000001) != 0); } - switch (blockCase_) { - case 2: - hash = (37 * hash) + TEXT_BLOCK_FIELD_NUMBER; - hash = (53 * hash) + getTextBlock().hashCode(); - break; - case 3: - hash = (37 * hash) + TABLE_BLOCK_FIELD_NUMBER; - hash = (53 * hash) + getTableBlock().hashCode(); - break; - case 4: - hash = (37 * hash) + LIST_BLOCK_FIELD_NUMBER; - hash = (53 * hash) + getListBlock().hashCode(); - break; - case 0: - default: + + /** + * + * + *
+         * Annotation of the image block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + * + * @return The annotations. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
+         * Annotation of the image block.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - 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(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(imageText_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, imageText_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAnnotations()); + } + if (imageSourceCase_ == 4) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, imageSource_); + } + if (imageSourceCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, imageSource_); + } + if (imageSourceCase_ == 6) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, imageSource_); + } + getUnknownFields().writeTo(output); + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(imageText_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, imageText_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnnotations()); + } + if (imageSourceCase_ == 4) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, imageSource_); + } + if (imageSourceCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, imageSource_); + } + if (imageSourceCase_ == 6) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, imageSource_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - 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 boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + other = + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + obj; - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getImageText().equals(other.getImageText())) return false; + if (hasAnnotations() != other.hasAnnotations()) return false; + if (hasAnnotations()) { + if (!getAnnotations().equals(other.getAnnotations())) return false; + } + if (!getImageSourceCase().equals(other.getImageSourceCase())) return false; + switch (imageSourceCase_) { + case 4: + if (!getBlobAssetId().equals(other.getBlobAssetId())) return false; + break; + case 5: + if (!getGcsUri().equals(other.getGcsUri())) return false; + break; + case 6: + if (!getDataUri().equals(other.getDataUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - 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 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) + IMAGE_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageText().hashCode(); + if (hasAnnotations()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotations().hashCode(); + } + switch (imageSourceCase_) { + case 4: + hash = (37 * hash) + BLOB_ASSET_ID_FIELD_NUMBER; + hash = (53 * hash) + getBlobAssetId().hashCode(); + break; + case 5: + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + break; + case 6: + hash = (37 * hash) + DATA_URI_FIELD_NUMBER; + hash = (53 * hash) + getDataUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + 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 newBuilderForType() { - return newBuilder(); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static Builder newBuilder( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseFrom(byte[] 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseFrom(byte[] 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
-       * Represents a block. A block could be one of the various types (text,
-       * table, list) supported.
-       * 
- * - * Protobuf type {@code - * google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor; + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + 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 - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.class, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder - .class); + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - // Construct using - // com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetPageSpanFieldBuilder(); - internalGetBoundingBoxFieldBuilder(); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + 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 clear() { - super.clear(); - bitField0_ = 0; - if (textBlockBuilder_ != null) { - textBlockBuilder_.clear(); - } - if (tableBlockBuilder_ != null) { - tableBlockBuilder_.clear(); - } - if (listBlockBuilder_ != null) { - listBlockBuilder_.clear(); - } - blockId_ = ""; - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } - boundingBox_ = null; - if (boundingBoxBuilder_ != null) { - boundingBoxBuilder_.dispose(); - boundingBoxBuilder_ = null; - } - blockCase_ = 0; - block_ = null; - return this; + public Builder newBuilderForType() { + return newBuilder(); } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .getDefaultInstance(); + public static Builder newBuilder( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock build() { - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - buildPartial() { - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock result = - new com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - private void buildPartial0( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.blockId_ = blockId_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); - to_bitField0_ |= 0x00000001; + /** + * + * + *
+         * Represents an image type block.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock) + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_descriptor; } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.boundingBox_ = - boundingBoxBuilder_ == null ? boundingBox_ : boundingBoxBuilder_.build(); - to_bitField0_ |= 0x00000002; + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.class, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.Builder.class); } - result.bitField0_ |= to_bitField0_; - } - private void buildPartialOneofs( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock result) { - result.blockCase_ = blockCase_; - result.block_ = this.block_; - if (blockCase_ == 2 && textBlockBuilder_ != null) { - result.block_ = textBlockBuilder_.build(); + // Construct using + // com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - if (blockCase_ == 3 && tableBlockBuilder_ != null) { - result.block_ = tableBlockBuilder_.build(); + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - if (blockCase_ == 4 && listBlockBuilder_ != null) { - result.block_ = listBlockBuilder_.build(); + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAnnotationsFieldBuilder(); + } } - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) { - return mergeFrom( - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) other); - } else { - super.mergeFrom(other); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + imageText_ = ""; + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + imageSourceCase_ = 0; + imageSource_ = null; return this; } - } - public Builder mergeFrom( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock other) { - if (other - == com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .getDefaultInstance()) return this; - if (!other.getBlockId().isEmpty()) { - blockId_ = other.blockId_; - bitField0_ |= 0x00000008; - onChanged(); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_descriptor; } - if (other.hasPageSpan()) { - mergePageSpan(other.getPageSpan()); + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance(); } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + build() { + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - switch (other.getBlockCase()) { - case TEXT_BLOCK: - { - mergeTextBlock(other.getTextBlock()); - break; - } - case TABLE_BLOCK: - { - mergeTableBlock(other.getTableBlock()); - break; - } - case LIST_BLOCK: - { - mergeListBlock(other.getListBlock()); - break; - } - case BLOCK_NOT_SET: - { - break; - } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + buildPartial() { + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + result = + new com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private void buildPartial0( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.imageText_ = imageText_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.annotations_ = + annotationsBuilder_ == null ? annotations_ : annotationsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_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 void buildPartialOneofs( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + result) { + result.imageSourceCase_ = imageSourceCase_; + result.imageSource_ = this.imageSource_; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) { + return mergeFrom( + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + other) { + if (other + == com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance()) return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getImageText().isEmpty()) { + imageText_ = other.imageText_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasAnnotations()) { + mergeAnnotations(other.getAnnotations()); + } + switch (other.getImageSourceCase()) { + case BLOB_ASSET_ID: + { + imageSourceCase_ = 4; + imageSource_ = other.imageSource_; + onChanged(); break; - case 10: - { - blockId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetTextBlockFieldBuilder().getBuilder(), extensionRegistry); - blockCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetTableBlockFieldBuilder().getBuilder(), extensionRegistry); - blockCase_ = 3; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetListBlockFieldBuilder().getBuilder(), extensionRegistry); - blockCase_ = 4; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetPageSpanFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetBoundingBoxFieldBuilder().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 { + } + case GCS_URI: + { + imageSourceCase_ = 5; + imageSource_ = other.imageSource_; + onChanged(); + break; + } + case DATA_URI: + { + imageSourceCase_ = 6; + imageSource_ = other.imageSource_; + onChanged(); + break; + } + case IMAGESOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); - } // finally - return this; - } + return this; + } - private int blockCase_ = 0; - private java.lang.Object block_; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public BlockCase getBlockCase() { - return BlockCase.forNumber(blockCase_); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (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_ |= 0x00000008; + break; + } // case 10 + case 18: + { + imageText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetAnnotationsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + imageSourceCase_ = 4; + imageSource_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + imageSourceCase_ = 5; + imageSource_ = s; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + imageSourceCase_ = 6; + imageSource_ = s; + 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 Builder clearBlock() { - blockCase_ = 0; - block_ = null; - onChanged(); - return this; - } + private int imageSourceCase_ = 0; + private java.lang.Object imageSource_; - private int bitField0_; + public ImageSourceCase getImageSourceCase() { + return ImageSourceCase.forNumber(imageSourceCase_); + } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlockOrBuilder> - textBlockBuilder_; + public Builder clearImageSource() { + imageSourceCase_ = 0; + imageSource_ = null; + onChanged(); + return this; + } - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - * - * @return Whether the textBlock field is set. - */ - @java.lang.Override - public boolean hasTextBlock() { - return blockCase_ == 2; - } + private int bitField0_; - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - * - * @return The textBlock. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock - getTextBlock() { - if (textBlockBuilder_ == null) { - if (blockCase_ == 2) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock) - block_; + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the blobAssetId field is set. + */ + @java.lang.Override + public boolean hasBlobAssetId() { + return imageSourceCase_ == 4; + } + + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The blobAssetId. + */ + @java.lang.Override + public java.lang.String getBlobAssetId() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 4) { + ref = imageSource_; } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.getDefaultInstance(); - } else { - if (blockCase_ == 2) { - return textBlockBuilder_.getMessage(); + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageSourceCase_ == 4) { + imageSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.getDefaultInstance(); } - } - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - */ - public Builder setTextBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock - value) { - if (textBlockBuilder_ == null) { + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for blobAssetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlobAssetIdBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 4) { + ref = imageSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 4) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The blobAssetId to set. + * @return This builder for chaining. + */ + public Builder setBlobAssetId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - block_ = value; + imageSourceCase_ = 4; + imageSource_ = value; onChanged(); - } else { - textBlockBuilder_.setMessage(value); + return this; } - blockCase_ = 2; - return this; - } - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - */ - public Builder setTextBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.Builder - builderForValue) { - if (textBlockBuilder_ == null) { - block_ = builderForValue.build(); - onChanged(); - } else { - textBlockBuilder_.setMessage(builderForValue.build()); + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBlobAssetId() { + if (imageSourceCase_ == 4) { + imageSourceCase_ = 0; + imageSource_ = null; + onChanged(); + } + return this; } - blockCase_ = 2; - return this; - } - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - */ - public Builder mergeTextBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock - value) { - if (textBlockBuilder_ == null) { - if (blockCase_ == 2 - && block_ - != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.getDefaultInstance()) { - block_ = - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.newBuilder( - (com.google.cloud.documentai.v1.Document.DocumentLayout - .DocumentLayoutBlock.LayoutTextBlock) - block_) - .mergeFrom(value) - .buildPartial(); - } else { - block_ = value; + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for blobAssetId to set. + * @return This builder for chaining. + */ + public Builder setBlobAssetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + imageSourceCase_ = 4; + imageSource_ = value; onChanged(); - } else { - if (blockCase_ == 2) { - textBlockBuilder_.mergeFrom(value); + return this; + } + + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the gcsUri field is set. + */ + @java.lang.Override + public boolean hasGcsUri() { + return imageSourceCase_ == 5; + } + + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 5) { + ref = imageSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageSourceCase_ == 5) { + imageSource_ = s; + } + return s; } else { - textBlockBuilder_.setMessage(value); + return (java.lang.String) ref; } } - blockCase_ = 2; - return this; - } - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - */ - public Builder clearTextBlock() { - if (textBlockBuilder_ == null) { - if (blockCase_ == 2) { - blockCase_ = 0; - block_ = null; - onChanged(); + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 5) { + ref = imageSource_; } - } else { - if (blockCase_ == 2) { - blockCase_ = 0; - block_ = null; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 5) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - textBlockBuilder_.clear(); } - return this; - } - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.Builder - getTextBlockBuilder() { - return internalGetTextBlockFieldBuilder().getBuilder(); - } + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageSourceCase_ = 5; + imageSource_ = value; + onChanged(); + return this; + } - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlockOrBuilder - getTextBlockOrBuilder() { - if ((blockCase_ == 2) && (textBlockBuilder_ != null)) { - return textBlockBuilder_.getMessageOrBuilder(); - } else { - if (blockCase_ == 2) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock) - block_; + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + if (imageSourceCase_ == 5) { + imageSourceCase_ = 0; + imageSource_ = null; + onChanged(); } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.getDefaultInstance(); + return this; } - } - /** - * - * - *
-         * Block consisting of text content.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlockOrBuilder> - internalGetTextBlockFieldBuilder() { - if (textBlockBuilder_ == null) { - if (!(blockCase_ == 2)) { - block_ = - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.getDefaultInstance(); + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - textBlockBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlockOrBuilder>( - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTextBlock) - block_, - getParentForChildren(), - isClean()); - block_ = null; + checkByteStringIsUtf8(value); + imageSourceCase_ = 5; + imageSource_ = value; + onChanged(); + return this; } - blockCase_ = 2; - onChanged(); - return textBlockBuilder_; - } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlockOrBuilder> - tableBlockBuilder_; + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the dataUri field is set. + */ + @java.lang.Override + public boolean hasDataUri() { + return imageSourceCase_ == 6; + } - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - * - * @return Whether the tableBlock field is set. - */ - @java.lang.Override - public boolean hasTableBlock() { - return blockCase_ == 3; - } + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataUri. + */ + @java.lang.Override + public java.lang.String getDataUri() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 6) { + ref = imageSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageSourceCase_ == 6) { + imageSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - * - * @return The tableBlock. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock - getTableBlock() { - if (tableBlockBuilder_ == null) { - if (blockCase_ == 3) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock) - block_; + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataUriBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 6) { + ref = imageSource_; } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.getDefaultInstance(); - } else { - if (blockCase_ == 3) { - return tableBlockBuilder_.getMessage(); + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 6) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.getDefaultInstance(); } - } - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - */ - public Builder setTableBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock - value) { - if (tableBlockBuilder_ == null) { + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataUri to set. + * @return This builder for chaining. + */ + public Builder setDataUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - block_ = value; + imageSourceCase_ = 6; + imageSource_ = value; onChanged(); - } else { - tableBlockBuilder_.setMessage(value); + return this; } - blockCase_ = 3; - return this; - } - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - */ - public Builder setTableBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.Builder - builderForValue) { - if (tableBlockBuilder_ == null) { - block_ = builderForValue.build(); - onChanged(); - } else { - tableBlockBuilder_.setMessage(builderForValue.build()); + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataUri() { + if (imageSourceCase_ == 6) { + imageSourceCase_ = 0; + imageSource_ = null; + onChanged(); + } + return this; } - blockCase_ = 3; - return this; - } - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - */ - public Builder mergeTableBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock - value) { - if (tableBlockBuilder_ == null) { - if (blockCase_ == 3 - && block_ - != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.getDefaultInstance()) { - block_ = - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.newBuilder( - (com.google.cloud.documentai.v1.Document.DocumentLayout - .DocumentLayoutBlock.LayoutTableBlock) - block_) - .mergeFrom(value) - .buildPartial(); - } else { - block_ = value; + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for dataUri to set. + * @return This builder for chaining. + */ + public Builder setDataUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + imageSourceCase_ = 6; + imageSource_ = value; onChanged(); - } else { - if (blockCase_ == 3) { - tableBlockBuilder_.mergeFrom(value); + return this; + } + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
+           * Mime type of the image. An IANA published [media type (MIME type)]
+           * (https://www.iana.org/assignments/media-types/media-types.xhtml).
+           * 
+ * + * string mime_type = 1; + * + * @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 { - tableBlockBuilder_.setMessage(value); + return (java.lang.String) ref; } } - blockCase_ = 3; - return this; - } - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - */ - public Builder clearTableBlock() { - if (tableBlockBuilder_ == null) { - if (blockCase_ == 3) { - blockCase_ = 0; - block_ = null; - onChanged(); - } - } else { - if (blockCase_ == 3) { - blockCase_ = 0; - block_ = null; + /** + * + * + *
+           * Mime type of the image. An IANA published [media type (MIME type)]
+           * (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; } - tableBlockBuilder_.clear(); } - return this; - } - - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.Builder - getTableBlockBuilder() { - return internalGetTableBlockFieldBuilder().getBuilder(); - } - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlockOrBuilder - getTableBlockOrBuilder() { - if ((blockCase_ == 3) && (tableBlockBuilder_ != null)) { - return tableBlockBuilder_.getMessageOrBuilder(); - } else { - if (blockCase_ == 3) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock) - block_; + /** + * + * + *
+           * Mime type of the image. An IANA published [media type (MIME type)]
+           * (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(); } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.getDefaultInstance(); + mimeType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; } - } - /** - * - * - *
-         * Block consisting of table content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlockOrBuilder> - internalGetTableBlockFieldBuilder() { - if (tableBlockBuilder_ == null) { - if (!(blockCase_ == 3)) { - block_ = - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.getDefaultInstance(); - } - tableBlockBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlockOrBuilder>( - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutTableBlock) - block_, - getParentForChildren(), - isClean()); - block_ = null; + /** + * + * + *
+           * Mime type of the image. An IANA published [media type (MIME type)]
+           * (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_ & ~0x00000008); + onChanged(); + return this; } - blockCase_ = 3; - onChanged(); - return tableBlockBuilder_; - } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlockOrBuilder> - listBlockBuilder_; + /** + * + * + *
+           * Mime type of the image. An IANA published [media type (MIME type)]
+           * (https://www.iana.org/assignments/media-types/media-types.xhtml).
+           * 
+ * + * 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_ |= 0x00000008; + onChanged(); + return this; + } - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - * - * @return Whether the listBlock field is set. - */ - @java.lang.Override - public boolean hasListBlock() { - return blockCase_ == 4; - } + private java.lang.Object imageText_ = ""; - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - * - * @return The listBlock. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock - getListBlock() { - if (listBlockBuilder_ == null) { - if (blockCase_ == 4) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock) - block_; + /** + * + * + *
+           * Text extracted from the image using OCR or alt text describing the
+           * image.
+           * 
+ * + * string image_text = 2; + * + * @return The imageText. + */ + public java.lang.String getImageText() { + java.lang.Object ref = imageText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageText_ = s; + return s; + } else { + return (java.lang.String) ref; } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.getDefaultInstance(); - } else { - if (blockCase_ == 4) { - return listBlockBuilder_.getMessage(); + } + + /** + * + * + *
+           * Text extracted from the image using OCR or alt text describing the
+           * image.
+           * 
+ * + * string image_text = 2; + * + * @return The bytes for imageText. + */ + public com.google.protobuf.ByteString getImageTextBytes() { + java.lang.Object ref = imageText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.getDefaultInstance(); } - } - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - */ - public Builder setListBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock - value) { - if (listBlockBuilder_ == null) { + /** + * + * + *
+           * Text extracted from the image using OCR or alt text describing the
+           * image.
+           * 
+ * + * string image_text = 2; + * + * @param value The imageText to set. + * @return This builder for chaining. + */ + public Builder setImageText(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - block_ = value; + imageText_ = value; + bitField0_ |= 0x00000010; onChanged(); - } else { - listBlockBuilder_.setMessage(value); + return this; } - blockCase_ = 4; - return this; - } - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - */ - public Builder setListBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.Builder - builderForValue) { - if (listBlockBuilder_ == null) { - block_ = builderForValue.build(); + /** + * + * + *
+           * Text extracted from the image using OCR or alt text describing the
+           * image.
+           * 
+ * + * string image_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearImageText() { + imageText_ = getDefaultInstance().getImageText(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); - } else { - listBlockBuilder_.setMessage(builderForValue.build()); + return this; } - blockCase_ = 4; - return this; - } - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - */ - public Builder mergeListBlock( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock - value) { - if (listBlockBuilder_ == null) { - if (blockCase_ == 4 - && block_ - != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.getDefaultInstance()) { - block_ = - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.newBuilder( - (com.google.cloud.documentai.v1.Document.DocumentLayout - .DocumentLayoutBlock.LayoutListBlock) - block_) - .mergeFrom(value) - .buildPartial(); + /** + * + * + *
+           * Text extracted from the image using OCR or alt text describing the
+           * image.
+           * 
+ * + * string image_text = 2; + * + * @param value The bytes for imageText to set. + * @return This builder for chaining. + */ + public Builder setImageTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageText_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + * + * @return Whether the annotations field is set. + */ + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + * + * @return The annotations. + */ + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + if (annotationsBuilder_ == null) { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; } else { - block_ = value; + return annotationsBuilder_.getMessage(); + } + } + + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + public Builder setAnnotations(com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotations_ = value; + } else { + annotationsBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; onChanged(); - } else { - if (blockCase_ == 4) { - listBlockBuilder_.mergeFrom(value); + return this; + } + + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + public Builder setAnnotations( + com.google.cloud.documentai.v1.Document.Annotations.Builder builderForValue) { + if (annotationsBuilder_ == null) { + annotations_ = builderForValue.build(); } else { - listBlockBuilder_.setMessage(value); + annotationsBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); + return this; } - blockCase_ = 4; - return this; - } - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - */ - public Builder clearListBlock() { - if (listBlockBuilder_ == null) { - if (blockCase_ == 4) { - blockCase_ = 0; - block_ = null; + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + public Builder mergeAnnotations( + com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && annotations_ != null + && annotations_ + != com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance()) { + getAnnotationsBuilder().mergeFrom(value); + } else { + annotations_ = value; + } + } else { + annotationsBuilder_.mergeFrom(value); + } + if (annotations_ != null) { + bitField0_ |= 0x00000020; onChanged(); } - } else { - if (blockCase_ == 4) { - blockCase_ = 0; - block_ = null; + return this; + } + + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000020); + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; } - listBlockBuilder_.clear(); + onChanged(); + return this; } - return this; - } - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.Builder - getListBlockBuilder() { - return internalGetListBlockFieldBuilder().getBuilder(); - } + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + public com.google.cloud.documentai.v1.Document.Annotations.Builder + getAnnotationsBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetAnnotationsFieldBuilder().getBuilder(); + } - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlockOrBuilder - getListBlockOrBuilder() { - if ((blockCase_ == 4) && (listBlockBuilder_ != null)) { - return listBlockBuilder_.getMessageOrBuilder(); - } else { - if (blockCase_ == 4) { - return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock) - block_; + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilder(); + } else { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; } - return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.getDefaultInstance(); } - } - /** - * - * - *
-         * Block consisting of list content/structure.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlockOrBuilder> - internalGetListBlockFieldBuilder() { - if (listBlockBuilder_ == null) { - if (!(blockCase_ == 4)) { - block_ = - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.getDefaultInstance(); + /** + * + * + *
+           * Annotation of the image block.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + internalGetAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder>( + getAnnotations(), getParentForChildren(), isClean()); + annotations_ = null; } - listBlockBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlockOrBuilder>( - (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutListBlock) - block_, - getParentForChildren(), - isClean()); - block_ = null; + return annotationsBuilder_; } - blockCase_ = 4; - onChanged(); - return listBlockBuilder_; + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock) } - private java.lang.Object blockId_ = ""; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock) + private static final com.google.cloud.documentai.v1.Document.DocumentLayout + .DocumentLayoutBlock.LayoutImageBlock + DEFAULT_INSTANCE; - /** - * - * - *
-         * ID of the block.
-         * 
- * - * string block_id = 1; - * - * @return The blockId. - */ - public java.lang.String getBlockId() { - java.lang.Object ref = blockId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - blockId_ = s; - return s; - } else { - return (java.lang.String) ref; - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock(); } - /** - * - * - *
-         * ID of the block.
-         * 
- * - * string block_id = 1; - * - * @return The bytes for blockId. - */ - public com.google.protobuf.ByteString getBlockIdBytes() { - java.lang.Object ref = blockId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - blockId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-         * ID of the block.
-         * 
- * - * string block_id = 1; - * - * @param value The blockId to set. - * @return This builder for chaining. - */ - public Builder setBlockId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - blockId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + getDefaultInstance() { + return DEFAULT_INSTANCE; } - /** - * - * - *
-         * ID of the block.
-         * 
- * - * string block_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearBlockId() { - blockId_ = getDefaultInstance().getBlockId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutImageBlock parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - /** - * - * - *
-         * ID of the block.
-         * 
- * - * string block_id = 1; - * - * @param value The bytes for blockId to set. - * @return This builder for chaining. - */ - public Builder setBlockIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - blockId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + public static com.google.protobuf.Parser parser() { + return PARSER; } - private com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan - pageSpan_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpanOrBuilder> - pageSpanBuilder_; - - /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - * - * @return Whether the pageSpan field is set. - */ - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000010) != 0); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - * - * @return The pageSpan. - */ + @java.lang.Override public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan - getPageSpan() { - if (pageSpanBuilder_ == null) { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.getDefaultInstance() - : pageSpan_; - } else { - return pageSpanBuilder_.getMessage(); - } + .LayoutImageBlock + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - */ - public Builder setPageSpan( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan - value) { - if (pageSpanBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pageSpan_ = value; - } else { - pageSpanBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } + private int bitField0_; + private int blockCase_ = 0; - /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - */ - public Builder setPageSpan( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.Builder - builderForValue) { - if (pageSpanBuilder_ == null) { - pageSpan_ = builderForValue.build(); - } else { - pageSpanBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } + @SuppressWarnings("serial") + private java.lang.Object block_; - /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - */ - public Builder mergePageSpan( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan - value) { - if (pageSpanBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && pageSpan_ != null - && pageSpan_ - != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.getDefaultInstance()) { - getPageSpanBuilder().mergeFrom(value); - } else { - pageSpan_ = value; - } - } else { - pageSpanBuilder_.mergeFrom(value); - } - if (pageSpan_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } + public enum BlockCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT_BLOCK(2), + TABLE_BLOCK(3), + LIST_BLOCK(4), + IMAGE_BLOCK(7), + BLOCK_NOT_SET(0); + private final int value; - /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - */ - public Builder clearPageSpan() { - bitField0_ = (bitField0_ & ~0x00000010); - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } - onChanged(); - return this; + private BlockCase(int value) { + this.value = value; } /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.Builder - getPageSpanBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetPageSpanFieldBuilder().getBuilder(); + @java.lang.Deprecated + public static BlockCase valueOf(int value) { + return forNumber(value); } - /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpanOrBuilder - getPageSpanOrBuilder() { - if (pageSpanBuilder_ != null) { - return pageSpanBuilder_.getMessageOrBuilder(); - } else { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.getDefaultInstance() - : pageSpan_; + public static BlockCase forNumber(int value) { + switch (value) { + case 2: + return TEXT_BLOCK; + case 3: + return TABLE_BLOCK; + case 4: + return LIST_BLOCK; + case 7: + return IMAGE_BLOCK; + case 0: + return BLOCK_NOT_SET; + default: + return null; } } - /** - * - * - *
-         * Page span of the block.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpanOrBuilder> - internalGetPageSpanFieldBuilder() { - if (pageSpanBuilder_ == null) { - pageSpanBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpan.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .LayoutPageSpanOrBuilder>(getPageSpan(), getParentForChildren(), isClean()); - pageSpan_ = null; - } - return pageSpanBuilder_; + public int getNumber() { + return this.value; } + }; - private com.google.cloud.documentai.v1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.BoundingPoly, - com.google.cloud.documentai.v1.BoundingPoly.Builder, - com.google.cloud.documentai.v1.BoundingPolyOrBuilder> - boundingBoxBuilder_; + public BlockCase getBlockCase() { + return BlockCase.forNumber(blockCase_); + } - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - * - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return ((bitField0_ & 0x00000020) != 0); - } + public static final int TEXT_BLOCK_FIELD_NUMBER = 2; - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - * - * @return The boundingBox. - */ - public com.google.cloud.documentai.v1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null - ? com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return Whether the textBlock field is set. + */ + @java.lang.Override + public boolean hasTextBlock() { + return blockCase_ == 2; + } - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - public Builder setBoundingBox(com.google.cloud.documentai.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - } else { - boundingBoxBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return The textBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + getTextBlock() { + if (blockCase_ == 2) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_; } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - public Builder setBoundingBox( - com.google.cloud.documentai.v1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder + getTextBlockOrBuilder() { + if (blockCase_ == 2) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_; } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - public Builder mergeBoundingBox(com.google.cloud.documentai.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && boundingBox_ != null - && boundingBox_ - != com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance()) { - getBoundingBoxBuilder().mergeFrom(value); - } else { - boundingBox_ = value; - } - } else { - boundingBoxBuilder_.mergeFrom(value); - } - if (boundingBox_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } + public static final int TABLE_BLOCK_FIELD_NUMBER = 3; - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - public Builder clearBoundingBox() { - bitField0_ = (bitField0_ & ~0x00000020); - boundingBox_ = null; - if (boundingBoxBuilder_ != null) { - boundingBoxBuilder_.dispose(); - boundingBoxBuilder_ = null; - } - onChanged(); - return this; - } + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return Whether the tableBlock field is set. + */ + @java.lang.Override + public boolean hasTableBlock() { + return blockCase_ == 3; + } - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - public com.google.cloud.documentai.v1.BoundingPoly.Builder getBoundingBoxBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetBoundingBoxFieldBuilder().getBuilder(); + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return The tableBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + getTableBlock() { + if (blockCase_ == 3) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_; } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - public com.google.cloud.documentai.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null - ? com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder + getTableBlockOrBuilder() { + if (blockCase_ == 3) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_; } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } - /** - * - * - *
-         * Identifies the bounding box for the block.
-         * 
- * - * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.BoundingPoly, - com.google.cloud.documentai.v1.BoundingPoly.Builder, - com.google.cloud.documentai.v1.BoundingPolyOrBuilder> - internalGetBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.BoundingPoly, - com.google.cloud.documentai.v1.BoundingPoly.Builder, - com.google.cloud.documentai.v1.BoundingPolyOrBuilder>( - getBoundingBox(), getParentForChildren(), isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } + public static final int LIST_BLOCK_FIELD_NUMBER = 4; - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return Whether the listBlock field is set. + */ + @java.lang.Override + public boolean hasListBlock() { + return blockCase_ == 4; } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) - private static final com.google.cloud.documentai.v1.Document.DocumentLayout - .DocumentLayoutBlock - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock(); + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return The listBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + getListBlock() { + if (blockCase_ == 4) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); } - public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder + getListBlockOrBuilder() { + if (blockCase_ == 4) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DocumentLayoutBlock parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - 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 IMAGE_BLOCK_FIELD_NUMBER = 7; - public static com.google.protobuf.Parser parser() { - return PARSER; + /** + * + * + *
+       * Block consisting of image content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + * + * @return Whether the imageBlock field is set. + */ + @java.lang.Override + public boolean hasImageBlock() { + return blockCase_ == 7; } + /** + * + * + *
+       * Block consisting of image content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + * + * @return The imageBlock. + */ @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + getImageBlock() { + if (blockCase_ == 7) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance(); } + /** + * + * + *
+       * Block consisting of image content.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + */ @java.lang.Override public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + .LayoutImageBlockOrBuilder + getImageBlockOrBuilder() { + if (blockCase_ == 7) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance(); } - } - - public static final int BLOCKS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> - blocks_; - - /** - * - * - *
-     * List of blocks in the document.
-     * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> - getBlocksList() { - return blocks_; - } - - /** - * - * - *
-     * List of blocks in the document.
-     * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder> - getBlocksOrBuilderList() { - return blocks_; - } - - /** - * - * - *
-     * List of blocks in the document.
-     * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - @java.lang.Override - public int getBlocksCount() { - return blocks_.size(); - } - - /** - * - * - *
-     * List of blocks in the document.
-     * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock getBlocks( - int index) { - return blocks_.get(index); - } - - /** - * - * - *
-     * List of blocks in the document.
-     * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder - getBlocksOrBuilder(int index) { - return blocks_.get(index); - } - private byte memoizedIsInitialized = -1; + public static final int BLOCK_ID_FIELD_NUMBER = 1; - @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 blockId_ = ""; - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
+       * ID of the block.
+       * 
+ * + * string block_id = 1; + * + * @return The blockId. + */ + @java.lang.Override + public java.lang.String getBlockId() { + java.lang.Object ref = blockId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + blockId_ = s; + return s; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(1, blocks_.get(i)); + /** + * + * + *
+       * ID of the block.
+       * 
+ * + * string block_id = 1; + * + * @return The bytes for blockId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlockIdBytes() { + java.lang.Object ref = blockId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + blockId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int PAGE_SPAN_FIELD_NUMBER = 5; + private com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + pageSpan_; - size = 0; - for (int i = 0; i < blocks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, blocks_.get(i)); + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + * + * @return Whether the pageSpan field is set. + */ + @java.lang.Override + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000001) != 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.documentai.v1.Document.DocumentLayout)) { - return super.equals(obj); + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + * + * @return The pageSpan. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + getPageSpan() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance() + : pageSpan_; } - com.google.cloud.documentai.v1.Document.DocumentLayout other = - (com.google.cloud.documentai.v1.Document.DocumentLayout) obj; - if (!getBlocksList().equals(other.getBlocksList())) 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 (getBlocksCount() > 0) { - hash = (37 * hash) + BLOCKS_FIELD_NUMBER; - hash = (53 * hash) + getBlocksList().hashCode(); + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder + getPageSpanOrBuilder() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance() + : pageSpan_; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static final int BOUNDING_BOX_FIELD_NUMBER = 6; + private com.google.cloud.documentai.v1.BoundingPoly boundingBox_; - public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+       * Identifies the bounding box for the block.
+       * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + * + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return ((bitField0_ & 0x00000002) != 0); + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
+       * Identifies the bounding box for the block.
+       * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + * + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.BoundingPoly getBoundingBox() { + return boundingBox_ == null + ? com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance() + : boundingBox_; + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
+       * Identifies the bounding box for the block.
+       * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return boundingBox_ == null + ? com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance() + : boundingBox_; + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.documentai.v1.Document.DocumentLayout 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.documentai.v1.Document.DocumentLayout 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.documentai.v1.Document.DocumentLayout 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(blockId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, blockId_); + } + if (blockCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_); + } + if (blockCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_); + } + if (blockCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getPageSpan()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getBoundingBox()); + } + if (blockCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + block_); + } + getUnknownFields().writeTo(output); + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout 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.documentai.v1.Document.DocumentLayout 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(blockId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, blockId_); + } + if (blockCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_); + } + if (blockCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_); + } + if (blockCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPageSpan()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBoundingBox()); + } + if (blockCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + block_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static com.google.cloud.documentai.v1.Document.DocumentLayout 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock other = + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) obj; - public static com.google.cloud.documentai.v1.Document.DocumentLayout 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 (!getBlockId().equals(other.getBlockId())) return false; + if (hasPageSpan() != other.hasPageSpan()) return false; + if (hasPageSpan()) { + if (!getPageSpan().equals(other.getPageSpan())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getBlockCase().equals(other.getBlockCase())) return false; + switch (blockCase_) { + case 2: + if (!getTextBlock().equals(other.getTextBlock())) return false; + break; + case 3: + if (!getTableBlock().equals(other.getTableBlock())) return false; + break; + case 4: + if (!getListBlock().equals(other.getListBlock())) return false; + break; + case 7: + if (!getImageBlock().equals(other.getImageBlock())) return false; + break; + case 0: + default: + } + 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) + BLOCK_ID_FIELD_NUMBER; + hash = (53 * hash) + getBlockId().hashCode(); + if (hasPageSpan()) { + hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getPageSpan().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + switch (blockCase_) { + case 2: + hash = (37 * hash) + TEXT_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getTextBlock().hashCode(); + break; + case 3: + hash = (37 * hash) + TABLE_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getTableBlock().hashCode(); + break; + case 4: + hash = (37 * hash) + LIST_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getListBlock().hashCode(); + break; + case 7: + hash = (37 * hash) + IMAGE_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getImageBlock().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static Builder newBuilder( - com.google.cloud.documentai.v1.Document.DocumentLayout prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
-     * Represents the parsed layout of a document as a collection of blocks that
-     * the document is divided into.
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1.Document.DocumentLayout} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.DocumentLayout) - com.google.cloud.documentai.v1.Document.DocumentLayoutOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor; + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.DocumentLayout.class, - com.google.cloud.documentai.v1.Document.DocumentLayout.Builder.class); + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - // Construct using com.google.cloud.documentai.v1.Document.DocumentLayout.newBuilder() - private Builder() {} + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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 (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - } else { - blocks_ = null; - blocksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor; + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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.documentai.v1.Document.DocumentLayout getDefaultInstanceForType() { - return com.google.cloud.documentai.v1.Document.DocumentLayout.getDefaultInstance(); + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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.documentai.v1.Document.DocumentLayout build() { - com.google.cloud.documentai.v1.Document.DocumentLayout result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + 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.documentai.v1.Document.DocumentLayout buildPartial() { - com.google.cloud.documentai.v1.Document.DocumentLayout result = - new com.google.cloud.documentai.v1.Document.DocumentLayout(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + public Builder newBuilderForType() { + return newBuilder(); } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1.Document.DocumentLayout result) { - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - private void buildPartial0(com.google.cloud.documentai.v1.Document.DocumentLayout result) { - int from_bitField0_ = bitField0_; + public static Builder newBuilder( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1.Document.DocumentLayout) { - return mergeFrom((com.google.cloud.documentai.v1.Document.DocumentLayout) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.documentai.v1.Document.DocumentLayout other) { - if (other == com.google.cloud.documentai.v1.Document.DocumentLayout.getDefaultInstance()) - return this; - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - blocksBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetBlocksFieldBuilder() - : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock m = - input.readMessage( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .parser(), - extensionRegistry); - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(m); - } else { - blocksBuilder_.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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> - blocks_ = java.util.Collections.emptyList(); - - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - blocks_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock>( - blocks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder> - blocksBuilder_; - - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public java.util.List< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> - getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** * * *
-       * List of blocks in the document.
+       * Represents a block. A block could be one of the various types (text,
+       * table, list) supported.
        * 
* - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock} */ - public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor; } - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock getBlocks( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.class, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder + .class); } - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder setBlocks( - int index, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); + // Construct using + // com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder setBlocks( - int index, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder - builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder addBlocks( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPageSpanFieldBuilder(); + internalGetBoundingBoxFieldBuilder(); } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder addBlocks( - int index, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textBlockBuilder_ != null) { + textBlockBuilder_.clear(); } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); + if (tableBlockBuilder_ != null) { + tableBlockBuilder_.clear(); + } + if (listBlockBuilder_ != null) { + listBlockBuilder_.clear(); + } + if (imageBlockBuilder_ != null) { + imageBlockBuilder_.clear(); + } + blockId_ = ""; + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + boundingBox_ = null; + if (boundingBoxBuilder_ != null) { + boundingBoxBuilder_.dispose(); + boundingBoxBuilder_ = null; + } + blockCase_ = 0; + block_ = null; + return this; } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder addBlocks( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder - builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor; } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder addBlocks( - int index, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder - builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance(); } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder addAllBlocks( - java.lang.Iterable< - ? extends - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> - values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock build() { + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blocksBuilder_.clear(); + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + buildPartial() { + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock result = + new com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); + private void buildPartial0( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.blockId_ = blockId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.boundingBox_ = + boundingBoxBuilder_ == null ? boundingBox_ : boundingBoxBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; } - return this; - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder - getBlocksBuilder(int index) { - return internalGetBlocksFieldBuilder().getBuilder(index); - } + private void buildPartialOneofs( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock result) { + result.blockCase_ = blockCase_; + result.block_ = this.block_; + if (blockCase_ == 2 && textBlockBuilder_ != null) { + result.block_ = textBlockBuilder_.build(); + } + if (blockCase_ == 3 && tableBlockBuilder_ != null) { + result.block_ = tableBlockBuilder_.build(); + } + if (blockCase_ == 4 && listBlockBuilder_ != null) { + result.block_ = listBlockBuilder_.build(); + } + if (blockCase_ == 7 && imageBlockBuilder_ != null) { + result.block_ = imageBlockBuilder_.build(); + } + } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder - getBlocksOrBuilder(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessageOrBuilder(index); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) { + return mergeFrom( + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) other); + } else { + super.mergeFrom(other); + return this; + } } - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.DocumentLayout - .DocumentLayoutBlockOrBuilder> - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock other) { + if (other + == com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()) return this; + if (!other.getBlockId().isEmpty()) { + blockId_ = other.blockId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasPageSpan()) { + mergePageSpan(other.getPageSpan()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + switch (other.getBlockCase()) { + case TEXT_BLOCK: + { + mergeTextBlock(other.getTextBlock()); + break; + } + case TABLE_BLOCK: + { + mergeTableBlock(other.getTableBlock()); + break; + } + case LIST_BLOCK: + { + mergeListBlock(other.getListBlock()); + break; + } + case IMAGE_BLOCK: + { + mergeImageBlock(other.getImageBlock()); + break; + } + case BLOCK_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder - addBlocksBuilder() { - return internalGetBlocksFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .getDefaultInstance()); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
-       * List of blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder - addBlocksBuilder(int index) { - return internalGetBlocksFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .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: + { + blockId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetTextBlockFieldBuilder().getBuilder(), extensionRegistry); + blockCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetTableBlockFieldBuilder().getBuilder(), extensionRegistry); + blockCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetListBlockFieldBuilder().getBuilder(), extensionRegistry); + blockCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetPageSpanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetBoundingBoxFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetImageBlockFieldBuilder().getBuilder(), extensionRegistry); + blockCase_ = 7; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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 blocks in the document.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; - * - */ - public java.util.List< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder> - getBlocksBuilderList() { - return internalGetBlocksFieldBuilder().getBuilderList(); - } + private int blockCase_ = 0; + private java.lang.Object block_; - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder> - internalGetBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock, - com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock - .Builder, - com.google.cloud.documentai.v1.Document.DocumentLayout - .DocumentLayoutBlockOrBuilder>( - blocks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - blocks_ = null; + public BlockCase getBlockCase() { + return BlockCase.forNumber(blockCase_); } - return blocksBuilder_; - } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.DocumentLayout) - } + public Builder clearBlock() { + blockCase_ = 0; + block_ = null; + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.DocumentLayout) - private static final com.google.cloud.documentai.v1.Document.DocumentLayout DEFAULT_INSTANCE; + private int bitField0_; - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.Document.DocumentLayout(); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder> + textBlockBuilder_; - public static com.google.cloud.documentai.v1.Document.DocumentLayout getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return Whether the textBlock field is set. + */ + @java.lang.Override + public boolean hasTextBlock() { + return blockCase_ == 2; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DocumentLayout parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return The textBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + getTextBlock() { + if (textBlockBuilder_ == null) { + if (blockCase_ == 2) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_; } - return builder.buildPartial(); + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } else { + if (blockCase_ == 2) { + return textBlockBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); } - }; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public Builder setTextBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + value) { + if (textBlockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + textBlockBuilder_.setMessage(value); + } + blockCase_ = 2; + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public Builder setTextBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder + builderForValue) { + if (textBlockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + textBlockBuilder_.setMessage(builderForValue.build()); + } + blockCase_ = 2; + return this; + } - @java.lang.Override - public com.google.cloud.documentai.v1.Document.DocumentLayout getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public Builder mergeTextBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + value) { + if (textBlockBuilder_ == null) { + if (blockCase_ == 2 + && block_ + != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance()) { + block_ = + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.newBuilder( + (com.google.cloud.documentai.v1.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock) + block_) + .mergeFrom(value) + .buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + if (blockCase_ == 2) { + textBlockBuilder_.mergeFrom(value); + } else { + textBlockBuilder_.setMessage(value); + } + } + blockCase_ = 2; + return this; + } - public interface ChunkedDocumentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public Builder clearTextBlock() { + if (textBlockBuilder_ == null) { + if (blockCase_ == 2) { + blockCase_ = 0; + block_ = null; + onChanged(); + } + } else { + if (blockCase_ == 2) { + blockCase_ = 0; + block_ = null; + } + textBlockBuilder_.clear(); + } + return this; + } - /** - * - * - *
-     * List of chunks.
-     * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - */ - java.util.List getChunksList(); + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder + getTextBlockBuilder() { + return internalGetTextBlockFieldBuilder().getBuilder(); + } - /** - * - * - *
-     * List of chunks.
-     * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk getChunks(int index); + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder + getTextBlockOrBuilder() { + if ((blockCase_ == 2) && (textBlockBuilder_ != null)) { + return textBlockBuilder_.getMessageOrBuilder(); + } else { + if (blockCase_ == 2) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } + } - /** - * - * - *
-     * List of chunks.
-     * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - */ - int getChunksCount(); - - /** - * - * - *
-     * List of chunks.
-     * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - */ - java.util.List - getChunksOrBuilderList(); - - /** - * - * - *
-     * List of chunks.
-     * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder getChunksOrBuilder( - int index); - } - - /** - * - * - *
-   * Represents the chunks that the document is divided into.
-   * 
- * - * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument} - */ - public static final class ChunkedDocument extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument) - ChunkedDocumentOrBuilder { - 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= */ "", - "ChunkedDocument"); - } - - // Use ChunkedDocument.newBuilder() to construct. - private ChunkedDocument(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ChunkedDocument() { - chunks_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Builder.class); - } - - public interface ChunkOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * ID of the chunk.
-       * 
- * - * string chunk_id = 1; - * - * @return The chunkId. - */ - java.lang.String getChunkId(); - - /** - * - * - *
-       * ID of the chunk.
-       * 
- * - * string chunk_id = 1; - * - * @return The bytes for chunkId. - */ - com.google.protobuf.ByteString getChunkIdBytes(); - - /** - * - * - *
-       * Unused.
-       * 
- * - * repeated string source_block_ids = 2; - * - * @return A list containing the sourceBlockIds. - */ - java.util.List getSourceBlockIdsList(); - - /** - * - * - *
-       * Unused.
-       * 
- * - * repeated string source_block_ids = 2; - * - * @return The count of sourceBlockIds. - */ - int getSourceBlockIdsCount(); - - /** - * - * - *
-       * Unused.
-       * 
- * - * repeated string source_block_ids = 2; - * - * @param index The index of the element to return. - * @return The sourceBlockIds at the given index. - */ - java.lang.String getSourceBlockIds(int index); - - /** - * - * - *
-       * Unused.
-       * 
- * - * repeated string source_block_ids = 2; - * - * @param index The index of the value to return. - * @return The bytes of the sourceBlockIds at the given index. - */ - com.google.protobuf.ByteString getSourceBlockIdsBytes(int index); - - /** - * - * - *
-       * Text content of the chunk.
-       * 
- * - * string content = 3; - * - * @return The content. - */ - java.lang.String getContent(); - - /** - * - * - *
-       * Text content of the chunk.
-       * 
- * - * string content = 3; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); - - /** - * - * - *
-       * Page span of the chunk.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; - * - * - * @return Whether the pageSpan field is set. - */ - boolean hasPageSpan(); - - /** - * - * - *
-       * Page span of the chunk.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; - * - * - * @return The pageSpan. - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan getPageSpan(); - - /** - * - * - *
-       * Page span of the chunk.
-       * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; - * - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder - getPageSpanOrBuilder(); - - /** - * - * - *
-       * Page headers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - java.util.List - getPageHeadersList(); - - /** - * - * - *
-       * Page headers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader getPageHeaders( - int index); - - /** - * - * - *
-       * Page headers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - int getPageHeadersCount(); - - /** - * - * - *
-       * Page headers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeaderOrBuilder> - getPageHeadersOrBuilderList(); - - /** - * - * - *
-       * Page headers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeaderOrBuilder - getPageHeadersOrBuilder(int index); - - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - java.util.List - getPageFootersList(); - - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter getPageFooters( - int index); - - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - int getPageFootersCount(); - - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooterOrBuilder> - getPageFootersOrBuilderList(); - - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooterOrBuilder - getPageFootersOrBuilder(int index); - } - - /** - * - * - *
-     * Represents a chunk.
-     * 
- * - * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument.Chunk} - */ - public static final class Chunk extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) - ChunkOrBuilder { - 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= */ "", - "Chunk"); - } - - // Use Chunk.newBuilder() to construct. - private Chunk(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Chunk() { - chunkId_ = ""; - sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - content_ = ""; - pageHeaders_ = java.util.Collections.emptyList(); - pageFooters_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder.class); - } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder> + internalGetTextBlockFieldBuilder() { + if (textBlockBuilder_ == null) { + if (!(blockCase_ == 2)) { + block_ = + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } + textBlockBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder>( + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + blockCase_ = 2; + onChanged(); + return textBlockBuilder_; + } - public interface ChunkPageSpanOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) - com.google.protobuf.MessageOrBuilder { + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder> + tableBlockBuilder_; /** * * *
-         * Page where chunk starts in the document.
+         * Block consisting of table content/structure.
          * 
* - * int32 page_start = 1; + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * * - * @return The pageStart. + * @return Whether the tableBlock field is set. */ - int getPageStart(); + @java.lang.Override + public boolean hasTableBlock() { + return blockCase_ == 3; + } /** * * *
-         * Page where chunk ends in the document.
+         * Block consisting of table content/structure.
          * 
* - * int32 page_end = 2; + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * * - * @return The pageEnd. + * @return The tableBlock. */ - int getPageEnd(); - } - - /** - * - * - *
-       * Represents where the chunk starts and ends in the document.
-       * 
- * - * Protobuf type {@code - * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan} - */ - public static final class ChunkPageSpan extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) - ChunkPageSpanOrBuilder { - 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= */ "", - "ChunkPageSpan"); - } - - // Use ChunkPageSpan.newBuilder() to construct. - private ChunkPageSpan(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ChunkPageSpan() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder.class); + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + getTableBlock() { + if (tableBlockBuilder_ == null) { + if (blockCase_ == 3) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } else { + if (blockCase_ == 3) { + return tableBlockBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } } - public static final int PAGE_START_FIELD_NUMBER = 1; - private int pageStart_ = 0; - /** * * *
-         * Page where chunk starts in the document.
+         * Block consisting of table content/structure.
          * 
* - * int32 page_start = 1; - * - * @return The pageStart. + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * */ - @java.lang.Override - public int getPageStart() { - return pageStart_; + public Builder setTableBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + value) { + if (tableBlockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + tableBlockBuilder_.setMessage(value); + } + blockCase_ = 3; + return this; } - public static final int PAGE_END_FIELD_NUMBER = 2; - private int pageEnd_ = 0; - /** * * *
-         * Page where chunk ends in the document.
+         * Block consisting of table content/structure.
          * 
* - * int32 page_end = 2; - * - * @return The pageEnd. + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * */ - @java.lang.Override - public int getPageEnd() { - return pageEnd_; - } - - 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 (pageStart_ != 0) { - output.writeInt32(1, pageStart_); - } - if (pageEnd_ != 0) { - output.writeInt32(2, pageEnd_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (pageStart_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageStart_); - } - if (pageEnd_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageEnd_); + public Builder setTableBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder + builderForValue) { + if (tableBlockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + tableBlockBuilder_.setMessage(builderForValue.build()); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + blockCase_ = 3; + return this; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan)) { - return super.equals(obj); + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + public Builder mergeTableBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + value) { + if (tableBlockBuilder_ == null) { + if (blockCase_ == 3 + && block_ + != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance()) { + block_ = + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.newBuilder( + (com.google.cloud.documentai.v1.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock) + block_) + .mergeFrom(value) + .buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + if (blockCase_ == 3) { + tableBlockBuilder_.mergeFrom(value); + } else { + tableBlockBuilder_.setMessage(value); + } } - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan other = - (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) obj; - - if (getPageStart() != other.getPageStart()) return false; - if (getPageEnd() != other.getPageEnd()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + blockCase_ = 3; + return this; } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + public Builder clearTableBlock() { + if (tableBlockBuilder_ == null) { + if (blockCase_ == 3) { + blockCase_ = 0; + block_ = null; + onChanged(); + } + } else { + if (blockCase_ == 3) { + blockCase_ = 0; + block_ = null; + } + tableBlockBuilder_.clear(); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PAGE_START_FIELD_NUMBER; - hash = (53 * hash) + getPageStart(); - hash = (37 * hash) + PAGE_END_FIELD_NUMBER; - hash = (53 * hash) + getPageEnd(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + return this; } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder + getTableBlockBuilder() { + return internalGetTableBlockFieldBuilder().getBuilder(); } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder + getTableBlockOrBuilder() { + if ((blockCase_ == 3) && (tableBlockBuilder_ != null)) { + return tableBlockBuilder_.getMessageOrBuilder(); + } else { + if (blockCase_ == 3) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder> + internalGetTableBlockFieldBuilder() { + if (tableBlockBuilder_ == null) { + if (!(blockCase_ == 3)) { + block_ = + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } + tableBlockBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder>( + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + blockCase_ = 3; + onChanged(); + return tableBlockBuilder_; } - public static Builder newBuilder( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder> + listBlockBuilder_; + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return Whether the listBlock field is set. + */ @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public boolean hasListBlock() { + return blockCase_ == 4; } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return The listBlock. + */ @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + getListBlock() { + if (listBlockBuilder_ == null) { + if (blockCase_ == 4) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } else { + if (blockCase_ == 4) { + return listBlockBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } } /** * * *
-         * Represents where the chunk starts and ends in the document.
+         * Block consisting of list content/structure.
          * 
* - * Protobuf type {@code - * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan} + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; + public Builder setListBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + value) { + if (listBlockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + listBlockBuilder_.setMessage(value); } + blockCase_ = 4; + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder.class); - } - - // Construct using - // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - pageStart_ = 0; - pageEnd_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; - } - - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - build() { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - buildPartial() { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan result = - new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public Builder setListBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder + builderForValue) { + if (listBlockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + listBlockBuilder_.setMessage(builderForValue.build()); } + blockCase_ = 4; + return this; + } - private void buildPartial0( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.pageStart_ = pageStart_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageEnd_ = pageEnd_; + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public Builder mergeListBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + value) { + if (listBlockBuilder_ == null) { + if (blockCase_ == 4 + && block_ + != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance()) { + block_ = + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.newBuilder( + (com.google.cloud.documentai.v1.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock) + block_) + .mergeFrom(value) + .buildPartial(); + } else { + block_ = value; } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) { - return mergeFrom( - (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) - other); + onChanged(); + } else { + if (blockCase_ == 4) { + listBlockBuilder_.mergeFrom(value); } else { - super.mergeFrom(other); - return this; + listBlockBuilder_.setMessage(value); } } + blockCase_ = 4; + return this; + } - public Builder mergeFrom( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan other) { - if (other - == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance()) return this; - if (other.getPageStart() != 0) { - setPageStart(other.getPageStart()); - } - if (other.getPageEnd() != 0) { - setPageEnd(other.getPageEnd()); + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public Builder clearListBlock() { + if (listBlockBuilder_ == null) { + if (blockCase_ == 4) { + blockCase_ = 0; + block_ = null; + 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(); + } else { + if (blockCase_ == 4) { + blockCase_ = 0; + block_ = null; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - pageStart_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - pageEnd_ = 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 pageStart_; - - /** - * - * - *
-           * Page where chunk starts in the document.
-           * 
- * - * int32 page_start = 1; - * - * @return The pageStart. - */ - @java.lang.Override - public int getPageStart() { - return pageStart_; - } - - /** - * - * - *
-           * Page where chunk starts in the document.
-           * 
- * - * int32 page_start = 1; - * - * @param value The pageStart to set. - * @return This builder for chaining. - */ - public Builder setPageStart(int value) { - - pageStart_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-           * Page where chunk starts in the document.
-           * 
- * - * int32 page_start = 1; - * - * @return This builder for chaining. - */ - public Builder clearPageStart() { - bitField0_ = (bitField0_ & ~0x00000001); - pageStart_ = 0; - onChanged(); - return this; - } - - private int pageEnd_; - - /** - * - * - *
-           * Page where chunk ends in the document.
-           * 
- * - * int32 page_end = 2; - * - * @return The pageEnd. - */ - @java.lang.Override - public int getPageEnd() { - return pageEnd_; - } - - /** - * - * - *
-           * Page where chunk ends in the document.
-           * 
- * - * int32 page_end = 2; - * - * @param value The pageEnd to set. - * @return This builder for chaining. - */ - public Builder setPageEnd(int value) { - - pageEnd_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-           * Page where chunk ends in the document.
-           * 
- * - * int32 page_end = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageEnd() { - bitField0_ = (bitField0_ & ~0x00000002); - pageEnd_ = 0; - onChanged(); - return this; + listBlockBuilder_.clear(); } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) - } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) - private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpan - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan(); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChunkPageSpan parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - 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; + return this; } - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder + getListBlockBuilder() { + return internalGetListBlockFieldBuilder().getBuilder(); } - } - - public interface ChunkPageHeaderOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) - com.google.protobuf.MessageOrBuilder { /** * * *
-         * Header in text format.
+         * Block consisting of list content/structure.
          * 
* - * string text = 1; - * - * @return The text. + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * */ - java.lang.String getText(); + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder + getListBlockOrBuilder() { + if ((blockCase_ == 4) && (listBlockBuilder_ != null)) { + return listBlockBuilder_.getMessageOrBuilder(); + } else { + if (blockCase_ == 4) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } + } /** * * *
-         * Header in text format.
+         * Block consisting of list content/structure.
          * 
* - * string text = 1; - * - * @return The bytes for text. + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * */ - com.google.protobuf.ByteString getTextBytes(); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder> + internalGetListBlockFieldBuilder() { + if (listBlockBuilder_ == null) { + if (!(blockCase_ == 4)) { + block_ = + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } + listBlockBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder>( + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + blockCase_ = 4; + onChanged(); + return listBlockBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlockOrBuilder> + imageBlockBuilder_; /** * * *
-         * Page span of the header.
+         * Block consisting of image content.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; * * - * @return Whether the pageSpan field is set. + * @return Whether the imageBlock field is set. */ - boolean hasPageSpan(); + @java.lang.Override + public boolean hasImageBlock() { + return blockCase_ == 7; + } /** * * *
-         * Page span of the header.
+         * Block consisting of image content.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; * * - * @return The pageSpan. + * @return The imageBlock. */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan getPageSpan(); + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + getImageBlock() { + if (imageBlockBuilder_ == null) { + if (blockCase_ == 7) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance(); + } else { + if (blockCase_ == 7) { + return imageBlockBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance(); + } + } /** * * *
-         * Page span of the header.
+         * Block consisting of image content.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; * */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder - getPageSpanOrBuilder(); - } - - /** - * - * - *
-       * Represents the page header associated with the chunk.
-       * 
- * - * Protobuf type {@code - * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader} - */ - public static final class ChunkPageHeader extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) - ChunkPageHeaderOrBuilder { - private static final long serialVersionUID = 0L; + public Builder setImageBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + value) { + if (imageBlockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + imageBlockBuilder_.setMessage(value); + } + blockCase_ = 7; + return this; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChunkPageHeader"); + /** + * + * + *
+         * Block consisting of image content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + */ + public Builder setImageBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.Builder + builderForValue) { + if (imageBlockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + imageBlockBuilder_.setMessage(builderForValue.build()); + } + blockCase_ = 7; + return this; } - // Use ChunkPageHeader.newBuilder() to construct. - private ChunkPageHeader(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); + /** + * + * + *
+         * Block consisting of image content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + */ + public Builder mergeImageBlock( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock + value) { + if (imageBlockBuilder_ == null) { + if (blockCase_ == 7 + && block_ + != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance()) { + block_ = + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.newBuilder( + (com.google.cloud.documentai.v1.Document.DocumentLayout + .DocumentLayoutBlock.LayoutImageBlock) + block_) + .mergeFrom(value) + .buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + if (blockCase_ == 7) { + imageBlockBuilder_.mergeFrom(value); + } else { + imageBlockBuilder_.setMessage(value); + } + } + blockCase_ = 7; + return this; } - private ChunkPageHeader() { - text_ = ""; + /** + * + * + *
+         * Block consisting of image content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + */ + public Builder clearImageBlock() { + if (imageBlockBuilder_ == null) { + if (blockCase_ == 7) { + blockCase_ = 0; + block_ = null; + onChanged(); + } + } else { + if (blockCase_ == 7) { + blockCase_ = 0; + block_ = null; + } + imageBlockBuilder_.clear(); + } + return this; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_descriptor; + /** + * + * + *
+         * Block consisting of image content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.Builder + getImageBlockBuilder() { + return internalGetImageBlockFieldBuilder().getBuilder(); } + /** + * + * + *
+         * Block consisting of image content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .Builder.class); + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlockOrBuilder + getImageBlockOrBuilder() { + if ((blockCase_ == 7) && (imageBlockBuilder_ != null)) { + return imageBlockBuilder_.getMessageOrBuilder(); + } else { + if (blockCase_ == 7) { + return (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + block_; + } + return com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance(); + } } - private int bitField0_; - public static final int TEXT_FIELD_NUMBER = 1; + /** + * + * + *
+         * Block consisting of image content.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock image_block = 7; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlockOrBuilder> + internalGetImageBlockFieldBuilder() { + if (imageBlockBuilder_ == null) { + if (!(blockCase_ == 7)) { + block_ = + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.getDefaultInstance(); + } + imageBlockBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlockOrBuilder>( + (com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutImageBlock) + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + blockCase_ = 7; + onChanged(); + return imageBlockBuilder_; + } - @SuppressWarnings("serial") - private volatile java.lang.Object text_ = ""; + private java.lang.Object blockId_ = ""; /** * * *
-         * Header in text format.
+         * ID of the block.
          * 
* - * string text = 1; + * string block_id = 1; * - * @return The text. + * @return The blockId. */ - @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 { + public java.lang.String getBlockId() { + java.lang.Object ref = blockId_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - text_ = s; + blockId_ = s; return s; + } else { + return (java.lang.String) ref; } } @@ -79849,2015 +81075,1710 @@ public java.lang.String getText() { * * *
-         * Header in text format.
+         * ID of the block.
          * 
* - * string text = 1; + * string block_id = 1; * - * @return The bytes for text. + * @return The bytes for blockId. */ - @java.lang.Override - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { + public com.google.protobuf.ByteString getBlockIdBytes() { + java.lang.Object ref = blockId_; + if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; + blockId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int PAGE_SPAN_FIELD_NUMBER = 2; - private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + /** + * + * + *
+         * ID of the block.
+         * 
+ * + * string block_id = 1; + * + * @param value The blockId to set. + * @return This builder for chaining. + */ + public Builder setBlockId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + blockId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+         * ID of the block.
+         * 
+ * + * string block_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearBlockId() { + blockId_ = getDefaultInstance().getBlockId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+         * ID of the block.
+         * 
+ * + * string block_id = 1; + * + * @param value The bytes for blockId to set. + * @return This builder for chaining. + */ + public Builder setBlockIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + blockId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan pageSpan_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder> + pageSpanBuilder_; /** * * *
-         * Page span of the header.
+         * Page span of the block.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; * * * @return Whether the pageSpan field is set. */ - @java.lang.Override public boolean hasPageSpan() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * * *
-         * Page span of the header.
+         * Page span of the block.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; * * * @return The pageSpan. */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan getPageSpan() { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; + if (pageSpanBuilder_ == null) { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance() + : pageSpan_; + } else { + return pageSpanBuilder_.getMessage(); + } } /** * * *
-         * Page span of the header.
+         * Page span of the block.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; * */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder - getPageSpanOrBuilder() { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; - } - - 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(text_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getPageSpan()); + public Builder setPageSpan( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + value) { + if (pageSpanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageSpan_ = value; + } else { + pageSpanBuilder_.setMessage(value); } - getUnknownFields().writeTo(output); + bitField0_ |= 0x00000020; + 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(text_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPageSpan()); + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder + builderForValue) { + if (pageSpanBuilder_ == null) { + pageSpan_ = builderForValue.build(); + } else { + pageSpanBuilder_.setMessage(builderForValue.build()); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + bitField0_ |= 0x00000020; + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader)) { - return super.equals(obj); + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public Builder mergePageSpan( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + value) { + if (pageSpanBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && pageSpan_ != null + && pageSpan_ + != com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance()) { + getPageSpanBuilder().mergeFrom(value); + } else { + pageSpan_ = value; + } + } else { + pageSpanBuilder_.mergeFrom(value); } - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader other = - (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) obj; - - if (!getText().equals(other.getText())) return false; - if (hasPageSpan() != other.hasPageSpan()) return false; - if (hasPageSpan()) { - if (!getPageSpan().equals(other.getPageSpan())) return false; + if (pageSpan_ != null) { + bitField0_ |= 0x00000020; + onChanged(); } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + return this; } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - if (hasPageSpan()) { - hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; - hash = (53 * hash) + getPageSpan().hashCode(); + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public Builder clearPageSpan() { + bitField0_ = (bitField0_ & ~0x00000020); + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + onChanged(); + return this; } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder + getPageSpanBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetPageSpanFieldBuilder().getBuilder(); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder + getPageSpanOrBuilder() { + if (pageSpanBuilder_ != null) { + return pageSpanBuilder_.getMessageOrBuilder(); + } else { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance() + : pageSpan_; + } } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder> + internalGetPageSpanFieldBuilder() { + if (pageSpanBuilder_ == null) { + pageSpanBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder>(getPageSpan(), getParentForChildren(), isClean()); + pageSpan_ = null; + } + return pageSpanBuilder_; } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + private com.google.cloud.documentai.v1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.BoundingPoly, + com.google.cloud.documentai.v1.BoundingPoly.Builder, + com.google.cloud.documentai.v1.BoundingPolyOrBuilder> + boundingBoxBuilder_; - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+         * Identifies the bounding box for the block.
+         * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + * + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return ((bitField0_ & 0x00000040) != 0); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
+         * Identifies the bounding box for the block.
+         * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + * + * @return The boundingBox. + */ + public com.google.cloud.documentai.v1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null + ? com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance() + : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+         * Identifies the bounding box for the block.
+         * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + */ + public Builder setBoundingBox(com.google.cloud.documentai.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + } else { + boundingBoxBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + /** + * + * + *
+         * Identifies the bounding box for the block.
+         * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + */ + public Builder setBoundingBox( + com.google.cloud.documentai.v1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + /** + * + * + *
+         * Identifies the bounding box for the block.
+         * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + */ + public Builder mergeBoundingBox(com.google.cloud.documentai.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && boundingBox_ != null + && boundingBox_ + != com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance()) { + getBoundingBoxBuilder().mergeFrom(value); + } else { + boundingBox_ = value; + } + } else { + boundingBoxBuilder_.mergeFrom(value); + } + if (boundingBox_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; } - public static Builder newBuilder( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
+         * Identifies the bounding box for the block.
+         * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + */ + public Builder clearBoundingBox() { + bitField0_ = (bitField0_ & ~0x00000040); + boundingBox_ = null; + if (boundingBoxBuilder_ != null) { + boundingBoxBuilder_.dispose(); + boundingBoxBuilder_ = null; + } + onChanged(); + return this; } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + /** + * + * + *
+         * Identifies the bounding box for the block.
+         * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + */ + public com.google.cloud.documentai.v1.BoundingPoly.Builder getBoundingBoxBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetBoundingBoxFieldBuilder().getBuilder(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
+         * Identifies the bounding box for the block.
+         * 
+ * + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; + */ + public com.google.cloud.documentai.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null + ? com.google.cloud.documentai.v1.BoundingPoly.getDefaultInstance() + : boundingBox_; + } } /** * * *
-         * Represents the page header associated with the chunk.
+         * Identifies the bounding box for the block.
          * 
* - * Protobuf type {@code - * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader} + * .google.cloud.documentai.v1.BoundingPoly bounding_box = 6; */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeaderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_descriptor; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.BoundingPoly, + com.google.cloud.documentai.v1.BoundingPoly.Builder, + com.google.cloud.documentai.v1.BoundingPolyOrBuilder> + internalGetBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.BoundingPoly, + com.google.cloud.documentai.v1.BoundingPoly.Builder, + com.google.cloud.documentai.v1.BoundingPolyOrBuilder>( + getBoundingBox(), getParentForChildren(), isClean()); + boundingBox_ = null; } + return boundingBoxBuilder_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .Builder.class); - } + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) + } - // Construct using - // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock) + private static final com.google.cloud.documentai.v1.Document.DocumentLayout + .DocumentLayoutBlock + DEFAULT_INSTANCE; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock(); + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetPageSpanFieldBuilder(); - } - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - text_ = ""; - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentLayoutBlock parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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 this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_descriptor; - } + }; - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .getDefaultInstance(); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - build() { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - buildPartial() { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader result = - new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - private void buildPartial0( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.text_ = text_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + public static final int BLOCKS_FIELD_NUMBER = 1; - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) { - return mergeFrom( - (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) - other); - } else { - super.mergeFrom(other); - return this; - } - } + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> + blocks_; - public Builder mergeFrom( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader other) { - if (other - == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .getDefaultInstance()) return this; - if (!other.getText().isEmpty()) { - text_ = other.text_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasPageSpan()) { - mergePageSpan(other.getPageSpan()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + return blocks_; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + return blocks_; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (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: - { - text_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetPageSpanFieldBuilder().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_; + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } - private java.lang.Object text_ = ""; + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock getBlocks( + int index) { + return blocks_.get(index); + } - /** - * - * - *
-           * Header in text format.
-           * 
- * - * string text = 1; - * - * @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; - } - } + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + return blocks_.get(index); + } - /** - * - * - *
-           * Header in text format.
-           * 
- * - * string text = 1; - * - * @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; - } - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
-           * Header in text format.
-           * 
- * - * string text = 1; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
-           * Header in text format.
-           * 
- * - * string text = 1; - * - * @return This builder for chaining. - */ - public Builder clearText() { - text_ = getDefaultInstance().getText(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
-           * Header in text format.
-           * 
- * - * string text = 1; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(1, blocks_.get(i)); + } + getUnknownFields().writeTo(output); + } - private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - pageSpan_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder> - pageSpanBuilder_; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - * - * @return Whether the pageSpan field is set. - */ - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000002) != 0); - } + size = 0; + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, blocks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - * - * @return The pageSpan. - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - getPageSpan() { - if (pageSpanBuilder_ == null) { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; - } else { - return pageSpanBuilder_.getMessage(); - } - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1.Document.DocumentLayout)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.DocumentLayout other = + (com.google.cloud.documentai.v1.Document.DocumentLayout) obj; - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public Builder setPageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { - if (pageSpanBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pageSpan_ = value; - } else { - pageSpanBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public Builder setPageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder - builderForValue) { - if (pageSpanBuilder_ == null) { - pageSpan_ = builderForValue.build(); - } else { - pageSpanBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public Builder mergePageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { - if (pageSpanBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && pageSpan_ != null - && pageSpan_ - != com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance()) { - getPageSpanBuilder().mergeFrom(value); - } else { - pageSpan_ = value; - } - } else { - pageSpanBuilder_.mergeFrom(value); - } - if (pageSpan_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public Builder clearPageSpan() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } - onChanged(); - return this; - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder - getPageSpanBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetPageSpanFieldBuilder().getBuilder(); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder - getPageSpanOrBuilder() { - if (pageSpanBuilder_ != null) { - return pageSpanBuilder_.getMessageOrBuilder(); - } else { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; - } - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
-           * Page span of the header.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder> - internalGetPageSpanFieldBuilder() { - if (pageSpanBuilder_ == null) { - pageSpanBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder>( - getPageSpan(), getParentForChildren(), isClean()); - pageSpan_ = null; - } - return pageSpanBuilder_; - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) - private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeader - DEFAULT_INSTANCE; + public static com.google.cloud.documentai.v1.Document.DocumentLayout parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader(); - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout 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 ChunkPageHeader parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - 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.documentai.v1.Document.DocumentLayout 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.documentai.v1.Document.DocumentLayout 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.Parser getParserForType() { - return PARSER; - } + public static com.google.cloud.documentai.v1.Document.DocumentLayout 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public interface ChunkPageFooterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) - com.google.protobuf.MessageOrBuilder { + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
-         * Footer in text format.
-         * 
- * - * string text = 1; - * - * @return The text. - */ - java.lang.String getText(); + public static Builder newBuilder( + com.google.cloud.documentai.v1.Document.DocumentLayout prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
-         * Footer in text format.
-         * 
- * - * string text = 1; - * - * @return The bytes for text. - */ - com.google.protobuf.ByteString getTextBytes(); + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
-         * Page span of the footer.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - * - * @return Whether the pageSpan field is set. - */ - boolean hasPageSpan(); + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
-         * Page span of the footer.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - * - * @return The pageSpan. - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan getPageSpan(); + /** + * + * + *
+     * Represents the parsed layout of a document as a collection of blocks that
+     * the document is divided into.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.DocumentLayout} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.DocumentLayout) + com.google.cloud.documentai.v1.Document.DocumentLayoutOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor; + } - /** - * - * - *
-         * Page span of the footer.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder - getPageSpanOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.DocumentLayout.class, + com.google.cloud.documentai.v1.Document.DocumentLayout.Builder.class); } - /** - * - * - *
-       * Represents the page footer associated with the chunk.
-       * 
- * - * Protobuf type {@code - * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter} - */ - public static final class ChunkPageFooter extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) - ChunkPageFooterOrBuilder { - private static final long serialVersionUID = 0L; + // Construct using com.google.cloud.documentai.v1.Document.DocumentLayout.newBuilder() + private Builder() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChunkPageFooter"); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - // Use ChunkPageFooter.newBuilder() to construct. - private ChunkPageFooter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + } else { + blocks_ = null; + blocksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } - private ChunkPageFooter() { - text_ = ""; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_descriptor; - } + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.DocumentLayout.getDefaultInstance(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .Builder.class); + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout build() { + com.google.cloud.documentai.v1.Document.DocumentLayout result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - private int bitField0_; - public static final int TEXT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object text_ = ""; - - /** - * - * - *
-         * Footer in text format.
-         * 
- * - * string text = 1; - * - * @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; - } + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout buildPartial() { + com.google.cloud.documentai.v1.Document.DocumentLayout result = + new com.google.cloud.documentai.v1.Document.DocumentLayout(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } - /** - * - * - *
-         * Footer in text format.
-         * 
- * - * string text = 1; - * - * @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 void buildPartialRepeatedFields( + com.google.cloud.documentai.v1.Document.DocumentLayout result) { + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); } + } - public static final int PAGE_SPAN_FIELD_NUMBER = 2; - private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - pageSpan_; + private void buildPartial0(com.google.cloud.documentai.v1.Document.DocumentLayout result) { + int from_bitField0_ = bitField0_; + } - /** - * - * - *
-         * Page span of the footer.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - * - * @return Whether the pageSpan field is set. - */ - @java.lang.Override - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000001) != 0); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1.Document.DocumentLayout) { + return mergeFrom((com.google.cloud.documentai.v1.Document.DocumentLayout) other); + } else { + super.mergeFrom(other); + return this; } + } - /** - * - * - *
-         * Page span of the footer.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - * - * @return The pageSpan. - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - getPageSpan() { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; + public Builder mergeFrom(com.google.cloud.documentai.v1.Document.DocumentLayout other) { + if (other == com.google.cloud.documentai.v1.Document.DocumentLayout.getDefaultInstance()) + return this; + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBlocksFieldBuilder() + : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
-         * Page span of the footer.
-         * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder - getPageSpanOrBuilder() { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; + @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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock m = + input.readMessage( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .parser(), + extensionRegistry); + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(m); + } else { + blocksBuilder_.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 byte memoizedIsInitialized = -1; + private int bitField0_; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private java.util.List< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> + blocks_ = java.util.Collections.emptyList(); - memoizedIsInitialized = 1; - return true; + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock>( + blocks_); + bitField0_ |= 0x00000001; } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getPageSpan()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder> + blocksBuilder_; - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPageSpan()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter)) { - return super.equals(obj); - } - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter other = - (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) obj; + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } - if (!getText().equals(other.getText())) return false; - if (hasPageSpan() != other.hasPageSpan()) return false; - if (hasPageSpan()) { - if (!getPageSpan().equals(other.getPageSpan())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock getBlocks( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - if (hasPageSpan()) { - hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; - hash = (53 * hash) + getPageSpan().hashCode(); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addAllBlocks( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock> + values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - 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 blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); } + return this; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder + getBlocksBuilder(int index) { + return internalGetBlocksFieldBuilder().getBuilder(index); + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - 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 blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessageOrBuilder(index); } + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); } + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - 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 blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder + addBlocksBuilder() { + return internalGetBlocksFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder + addBlocksBuilder(int index) { + return internalGetBlocksFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder> + getBlocksBuilderList() { + return internalGetBlocksFieldBuilder().getBuilderList(); + } - public static Builder newBuilder( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder> + internalGetBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder>( + blocks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + blocks_ = null; } + return blocksBuilder_; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.DocumentLayout) + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.DocumentLayout) + private static final com.google.cloud.documentai.v1.Document.DocumentLayout DEFAULT_INSTANCE; - /** - * - * - *
-         * Represents the page footer associated with the chunk.
-         * 
- * - * Protobuf type {@code - * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_descriptor; - } + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.Document.DocumentLayout(); + } + + public static com.google.cloud.documentai.v1.Document.DocumentLayout 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.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .Builder.class); + public DocumentLayout parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + 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) { - internalGetPageSpanFieldBuilder(); - } - } + @java.lang.Override + public com.google.cloud.documentai.v1.Document.DocumentLayout getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - text_ = ""; - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } - return this; - } + public interface ChunkedDocumentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_descriptor; - } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + java.util.List getChunksList(); - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .getDefaultInstance(); - } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk getChunks(int index); - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - build() { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + int getChunksCount(); - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - buildPartial() { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter result = - new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + java.util.List + getChunksOrBuilderList(); - private void buildPartial0( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.text_ = text_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder getChunksOrBuilder( + int index); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) { - return mergeFrom( - (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) - other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
+   * Represents the chunks that the document is divided into.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument} + */ + public static final class ChunkedDocument extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument) + ChunkedDocumentOrBuilder { + private static final long serialVersionUID = 0L; - public Builder mergeFrom( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter other) { - if (other - == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .getDefaultInstance()) return this; - if (!other.getText().isEmpty()) { - text_ = other.text_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasPageSpan()) { - mergePageSpan(other.getPageSpan()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChunkedDocument"); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + // Use ChunkedDocument.newBuilder() to construct. + private ChunkedDocument(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (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: - { - text_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetPageSpanFieldBuilder().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 ChunkedDocument() { + chunks_ = java.util.Collections.emptyList(); + } - private int bitField0_; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor; + } - private java.lang.Object text_ = ""; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Builder.class); + } - /** - * - * - *
-           * Footer in text format.
-           * 
- * - * string text = 1; - * - * @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; - } - } + public interface ChunkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) + com.google.protobuf.MessageOrBuilder { - /** - * - * - *
-           * Footer in text format.
-           * 
- * - * string text = 1; - * - * @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; - } - } + /** + * + * + *
+       * ID of the chunk.
+       * 
+ * + * string chunk_id = 1; + * + * @return The chunkId. + */ + java.lang.String getChunkId(); - /** - * - * - *
-           * Footer in text format.
-           * 
- * - * string text = 1; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
+       * ID of the chunk.
+       * 
+ * + * string chunk_id = 1; + * + * @return The bytes for chunkId. + */ + com.google.protobuf.ByteString getChunkIdBytes(); - /** - * - * - *
-           * Footer in text format.
-           * 
- * - * string text = 1; - * - * @return This builder for chaining. - */ - public Builder clearText() { - text_ = getDefaultInstance().getText(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + /** + * + * + *
+       * Unused.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @return A list containing the sourceBlockIds. + */ + java.util.List getSourceBlockIdsList(); - /** - * - * - *
-           * Footer in text format.
-           * 
- * - * string text = 1; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
+       * Unused.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @return The count of sourceBlockIds. + */ + int getSourceBlockIdsCount(); - private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - pageSpan_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder> - pageSpanBuilder_; - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - * - * @return Whether the pageSpan field is set. - */ - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - * - * @return The pageSpan. - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - getPageSpan() { - if (pageSpanBuilder_ == null) { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; - } else { - return pageSpanBuilder_.getMessage(); - } - } - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public Builder setPageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { - if (pageSpanBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pageSpan_ = value; - } else { - pageSpanBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public Builder setPageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder - builderForValue) { - if (pageSpanBuilder_ == null) { - pageSpan_ = builderForValue.build(); - } else { - pageSpanBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public Builder mergePageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { - if (pageSpanBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && pageSpan_ != null - && pageSpan_ - != com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance()) { - getPageSpanBuilder().mergeFrom(value); - } else { - pageSpan_ = value; - } - } else { - pageSpanBuilder_.mergeFrom(value); - } - if (pageSpan_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public Builder clearPageSpan() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder - getPageSpanBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetPageSpanFieldBuilder().getBuilder(); - } - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder - getPageSpanOrBuilder() { - if (pageSpanBuilder_ != null) { - return pageSpanBuilder_.getMessageOrBuilder(); - } else { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; - } - } - - /** - * - * - *
-           * Page span of the footer.
-           * 
- * - * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder> - internalGetPageSpanFieldBuilder() { - if (pageSpanBuilder_ == null) { - pageSpanBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder>( - getPageSpan(), getParentForChildren(), isClean()); - pageSpan_ = null; - } - return pageSpanBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) - } - - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) - private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooter - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter(); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChunkPageFooter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int CHUNK_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object chunkId_ = ""; - - /** - * - * - *
-       * ID of the chunk.
-       * 
- * - * string chunk_id = 1; - * - * @return The chunkId. - */ - @java.lang.Override - public java.lang.String getChunkId() { - java.lang.Object ref = chunkId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - chunkId_ = s; - return s; - } - } - - /** - * - * - *
-       * ID of the chunk.
-       * 
- * - * string chunk_id = 1; - * - * @return The bytes for chunkId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChunkIdBytes() { - java.lang.Object ref = chunkId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - chunkId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_BLOCK_IDS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList sourceBlockIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-       * Unused.
-       * 
- * - * repeated string source_block_ids = 2; - * - * @return A list containing the sourceBlockIds. - */ - public com.google.protobuf.ProtocolStringList getSourceBlockIdsList() { - return sourceBlockIds_; - } - - /** - * - * - *
-       * Unused.
-       * 
- * - * repeated string source_block_ids = 2; - * - * @return The count of sourceBlockIds. - */ - public int getSourceBlockIdsCount() { - return sourceBlockIds_.size(); - } - - /** - * - * - *
-       * Unused.
-       * 
- * - * repeated string source_block_ids = 2; - * - * @param index The index of the element to return. - * @return The sourceBlockIds at the given index. - */ - public java.lang.String getSourceBlockIds(int index) { - return sourceBlockIds_.get(index); - } + /** + * + * + *
+       * Unused.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the element to return. + * @return The sourceBlockIds at the given index. + */ + java.lang.String getSourceBlockIds(int index); /** * @@ -81871,14 +82792,7 @@ public java.lang.String getSourceBlockIds(int index) { * @param index The index of the value to return. * @return The bytes of the sourceBlockIds at the given index. */ - public com.google.protobuf.ByteString getSourceBlockIdsBytes(int index) { - return sourceBlockIds_.getByteString(index); - } - - public static final int CONTENT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + com.google.protobuf.ByteString getSourceBlockIdsBytes(int index); /** * @@ -81891,18 +82805,7 @@ public com.google.protobuf.ByteString getSourceBlockIdsBytes(int index) { * * @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; - } - } + java.lang.String getContent(); /** * @@ -81915,21 +82818,7 @@ public java.lang.String getContent() { * * @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 PAGE_SPAN_FIELD_NUMBER = 4; - private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan pageSpan_; + com.google.protobuf.ByteString getContentBytes(); /** * @@ -81944,10 +82833,7 @@ public com.google.protobuf.ByteString getContentBytes() { * * @return Whether the pageSpan field is set. */ - @java.lang.Override - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000001) != 0); - } + boolean hasPageSpan(); /** * @@ -81962,14 +82848,7 @@ public boolean hasPageSpan() { * * @return The pageSpan. */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - getPageSpan() { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; - } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan getPageSpan(); /** * @@ -81982,21 +82861,8 @@ public boolean hasPageSpan() { * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; * */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder - getPageSpanOrBuilder() { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; - } - - public static final int PAGE_HEADERS_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader> - pageHeaders_; + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder + getPageSpanOrBuilder(); /** * @@ -82009,12 +82875,8 @@ public boolean hasPageSpan() { * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; * */ - @java.lang.Override - public java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader> - getPageHeadersList() { - return pageHeaders_; - } + java.util.List + getPageHeadersList(); /** * @@ -82027,14 +82889,8 @@ public boolean hasPageSpan() { * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; * */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeaderOrBuilder> - getPageHeadersOrBuilderList() { - return pageHeaders_; - } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader getPageHeaders( + int index); /** * @@ -82047,10 +82903,7 @@ public boolean hasPageSpan() { * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; * */ - @java.lang.Override - public int getPageHeadersCount() { - return pageHeaders_.size(); - } + int getPageHeadersCount(); /** * @@ -82063,11 +82916,11 @@ public int getPageHeadersCount() { * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; * */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - getPageHeaders(int index) { - return pageHeaders_.get(index); - } + java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeaderOrBuilder> + getPageHeadersOrBuilderList(); /** * @@ -82080,18 +82933,22 @@ public int getPageHeadersCount() { * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; * */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeaderOrBuilder - getPageHeadersOrBuilder(int index) { - return pageHeaders_.get(index); - } - - public static final int PAGE_FOOTERS_FIELD_NUMBER = 6; + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeaderOrBuilder + getPageHeadersOrBuilder(int index); - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter> - pageFooters_; + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + java.util.List + getPageFootersList(); /** * @@ -82104,678 +82961,9058 @@ public int getPageHeadersCount() { * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; * */ - @java.lang.Override + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter getPageFooters( + int index); + + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + int getPageFootersCount(); + + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooterOrBuilder> + getPageFootersOrBuilderList(); + + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooterOrBuilder + getPageFootersOrBuilder(int index); + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + java.util.List + getChunkFieldsList(); + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField getChunkFields( + int index); + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + int getChunkFieldsCount(); + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkFieldOrBuilder> + getChunkFieldsOrBuilderList(); + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkFieldOrBuilder + getChunkFieldsOrBuilder(int index); + } + + /** + * + * + *
+     * Represents a chunk.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument.Chunk} + */ + public static final class Chunk extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) + ChunkOrBuilder { + 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= */ "", + "Chunk"); + } + + // Use Chunk.newBuilder() to construct. + private Chunk(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Chunk() { + chunkId_ = ""; + sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + content_ = ""; + pageHeaders_ = java.util.Collections.emptyList(); + pageFooters_ = java.util.Collections.emptyList(); + chunkFields_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder.class); + } + + public interface ChunkPageSpanOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Page where chunk starts in the document.
+         * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + int getPageStart(); + + /** + * + * + *
+         * Page where chunk ends in the document.
+         * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + int getPageEnd(); + } + + /** + * + * + *
+       * Represents where the chunk starts and ends in the document.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan} + */ + public static final class ChunkPageSpan extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) + ChunkPageSpanOrBuilder { + 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= */ "", + "ChunkPageSpan"); + } + + // Use ChunkPageSpan.newBuilder() to construct. + private ChunkPageSpan(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChunkPageSpan() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder.class); + } + + public static final int PAGE_START_FIELD_NUMBER = 1; + private int pageStart_ = 0; + + /** + * + * + *
+         * Page where chunk starts in the document.
+         * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + @java.lang.Override + public int getPageStart() { + return pageStart_; + } + + public static final int PAGE_END_FIELD_NUMBER = 2; + private int pageEnd_ = 0; + + /** + * + * + *
+         * Page where chunk ends in the document.
+         * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + @java.lang.Override + public int getPageEnd() { + return pageEnd_; + } + + 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 (pageStart_ != 0) { + output.writeInt32(1, pageStart_); + } + if (pageEnd_ != 0) { + output.writeInt32(2, pageEnd_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageStart_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageStart_); + } + if (pageEnd_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageEnd_); + } + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan other = + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) obj; + + if (getPageStart() != other.getPageStart()) return false; + if (getPageEnd() != other.getPageEnd()) 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_START_FIELD_NUMBER; + hash = (53 * hash) + getPageStart(); + hash = (37 * hash) + PAGE_END_FIELD_NUMBER; + hash = (53 * hash) + getPageEnd(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan 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 where the chunk starts and ends in the document.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageStart_ = 0; + pageEnd_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + build() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + buildPartial() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan result = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageStart_ = pageStart_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageEnd_ = pageEnd_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) { + return mergeFrom( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan other) { + if (other + == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance()) return this; + if (other.getPageStart() != 0) { + setPageStart(other.getPageStart()); + } + if (other.getPageEnd() != 0) { + setPageEnd(other.getPageEnd()); + } + 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: + { + pageStart_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + pageEnd_ = 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 pageStart_; + + /** + * + * + *
+           * Page where chunk starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + @java.lang.Override + public int getPageStart() { + return pageStart_; + } + + /** + * + * + *
+           * Page where chunk starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @param value The pageStart to set. + * @return This builder for chaining. + */ + public Builder setPageStart(int value) { + + pageStart_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+           * Page where chunk starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageStart() { + bitField0_ = (bitField0_ & ~0x00000001); + pageStart_ = 0; + onChanged(); + return this; + } + + private int pageEnd_; + + /** + * + * + *
+           * Page where chunk ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + @java.lang.Override + public int getPageEnd() { + return pageEnd_; + } + + /** + * + * + *
+           * Page where chunk ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @param value The pageEnd to set. + * @return This builder for chaining. + */ + public Builder setPageEnd(int value) { + + pageEnd_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+           * Page where chunk ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + pageEnd_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan) + private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpan + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan(); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkPageSpan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChunkPageHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Header in text format.
+         * 
+ * + * string text = 1; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+         * Header in text format.
+         * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+         * Page span of the header.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return Whether the pageSpan field is set. + */ + boolean hasPageSpan(); + + /** + * + * + *
+         * Page span of the header.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return The pageSpan. + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan getPageSpan(); + + /** + * + * + *
+         * Page span of the header.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder + getPageSpanOrBuilder(); + } + + /** + * + * + *
+       * Represents the page header associated with the chunk.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader} + */ + public static final class ChunkPageHeader extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) + ChunkPageHeaderOrBuilder { + 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= */ "", + "ChunkPageHeader"); + } + + // Use ChunkPageHeader.newBuilder() to construct. + private ChunkPageHeader(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChunkPageHeader() { + text_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .Builder.class); + } + + private int bitField0_; + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + + /** + * + * + *
+         * Header in text format.
+         * 
+ * + * string text = 1; + * + * @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; + } + } + + /** + * + * + *
+         * Header in text format.
+         * 
+ * + * string text = 1; + * + * @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; + } + } + + public static final int PAGE_SPAN_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + pageSpan_; + + /** + * + * + *
+         * Page span of the header.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return Whether the pageSpan field is set. + */ + @java.lang.Override + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+         * Page span of the header.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return The pageSpan. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + + /** + * + * + *
+         * Page span of the header.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder + getPageSpanOrBuilder() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + + 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(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPageSpan()); + } + 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(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPageSpan()); + } + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader other = + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) obj; + + if (!getText().equals(other.getText())) return false; + if (hasPageSpan() != other.hasPageSpan()) return false; + if (hasPageSpan()) { + if (!getPageSpan().equals(other.getPageSpan())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + if (hasPageSpan()) { + hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getPageSpan().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + 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 page header associated with the chunk.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPageSpanFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageHeader_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + build() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + buildPartial() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader result = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) { + return mergeFrom( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader other) { + if (other + == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPageSpan()) { + mergePageSpan(other.getPageSpan()); + } + 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: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetPageSpanFieldBuilder().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 text_ = ""; + + /** + * + * + *
+           * Header in text format.
+           * 
+ * + * string text = 1; + * + * @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; + } + } + + /** + * + * + *
+           * Header in text format.
+           * 
+ * + * string text = 1; + * + * @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; + } + } + + /** + * + * + *
+           * Header in text format.
+           * 
+ * + * string text = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+           * Header in text format.
+           * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+           * Header in text format.
+           * 
+ * + * string text = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + pageSpan_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder> + pageSpanBuilder_; + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return Whether the pageSpan field is set. + */ + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return The pageSpan. + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan() { + if (pageSpanBuilder_ == null) { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } else { + return pageSpanBuilder_.getMessage(); + } + } + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { + if (pageSpanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageSpan_ = value; + } else { + pageSpanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder + builderForValue) { + if (pageSpanBuilder_ == null) { + pageSpan_ = builderForValue.build(); + } else { + pageSpanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public Builder mergePageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { + if (pageSpanBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && pageSpan_ != null + && pageSpan_ + != com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance()) { + getPageSpanBuilder().mergeFrom(value); + } else { + pageSpan_ = value; + } + } else { + pageSpanBuilder_.mergeFrom(value); + } + if (pageSpan_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public Builder clearPageSpan() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder + getPageSpanBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPageSpanFieldBuilder().getBuilder(); + } + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder + getPageSpanOrBuilder() { + if (pageSpanBuilder_ != null) { + return pageSpanBuilder_.getMessageOrBuilder(); + } else { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + } + + /** + * + * + *
+           * Page span of the header.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder> + internalGetPageSpanFieldBuilder() { + if (pageSpanBuilder_ == null) { + pageSpanBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder>( + getPageSpan(), getParentForChildren(), isClean()); + pageSpan_ = null; + } + return pageSpanBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader) + private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeader + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader(); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkPageHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChunkPageFooterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Footer in text format.
+         * 
+ * + * string text = 1; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+         * Footer in text format.
+         * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+         * Page span of the footer.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return Whether the pageSpan field is set. + */ + boolean hasPageSpan(); + + /** + * + * + *
+         * Page span of the footer.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return The pageSpan. + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan getPageSpan(); + + /** + * + * + *
+         * Page span of the footer.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder + getPageSpanOrBuilder(); + } + + /** + * + * + *
+       * Represents the page footer associated with the chunk.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter} + */ + public static final class ChunkPageFooter extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) + ChunkPageFooterOrBuilder { + 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= */ "", + "ChunkPageFooter"); + } + + // Use ChunkPageFooter.newBuilder() to construct. + private ChunkPageFooter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChunkPageFooter() { + text_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .Builder.class); + } + + private int bitField0_; + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + + /** + * + * + *
+         * Footer in text format.
+         * 
+ * + * string text = 1; + * + * @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; + } + } + + /** + * + * + *
+         * Footer in text format.
+         * 
+ * + * string text = 1; + * + * @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; + } + } + + public static final int PAGE_SPAN_FIELD_NUMBER = 2; + private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + pageSpan_; + + /** + * + * + *
+         * Page span of the footer.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return Whether the pageSpan field is set. + */ + @java.lang.Override + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+         * Page span of the footer.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return The pageSpan. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + + /** + * + * + *
+         * Page span of the footer.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder + getPageSpanOrBuilder() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + + 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(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPageSpan()); + } + 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(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPageSpan()); + } + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter other = + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) obj; + + if (!getText().equals(other.getText())) return false; + if (hasPageSpan() != other.hasPageSpan()) return false; + if (hasPageSpan()) { + if (!getPageSpan().equals(other.getPageSpan())) 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) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + if (hasPageSpan()) { + hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getPageSpan().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + 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 page footer associated with the chunk.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPageSpanFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + build() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + buildPartial() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter result = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) { + return mergeFrom( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter other) { + if (other + == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPageSpan()) { + mergePageSpan(other.getPageSpan()); + } + 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: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetPageSpanFieldBuilder().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 text_ = ""; + + /** + * + * + *
+           * Footer in text format.
+           * 
+ * + * string text = 1; + * + * @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; + } + } + + /** + * + * + *
+           * Footer in text format.
+           * 
+ * + * string text = 1; + * + * @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; + } + } + + /** + * + * + *
+           * Footer in text format.
+           * 
+ * + * string text = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+           * Footer in text format.
+           * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+           * Footer in text format.
+           * 
+ * + * string text = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + pageSpan_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder> + pageSpanBuilder_; + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return Whether the pageSpan field is set. + */ + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + * + * @return The pageSpan. + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan() { + if (pageSpanBuilder_ == null) { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } else { + return pageSpanBuilder_.getMessage(); + } + } + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { + if (pageSpanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageSpan_ = value; + } else { + pageSpanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder + builderForValue) { + if (pageSpanBuilder_ == null) { + pageSpan_ = builderForValue.build(); + } else { + pageSpanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public Builder mergePageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { + if (pageSpanBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && pageSpan_ != null + && pageSpan_ + != com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance()) { + getPageSpanBuilder().mergeFrom(value); + } else { + pageSpan_ = value; + } + } else { + pageSpanBuilder_.mergeFrom(value); + } + if (pageSpan_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public Builder clearPageSpan() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder + getPageSpanBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPageSpanFieldBuilder().getBuilder(); + } + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder + getPageSpanOrBuilder() { + if (pageSpanBuilder_ != null) { + return pageSpanBuilder_.getMessageOrBuilder(); + } else { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + } + + /** + * + * + *
+           * Page span of the footer.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder> + internalGetPageSpanFieldBuilder() { + if (pageSpanBuilder_ == null) { + pageSpanBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder>( + getPageSpan(), getParentForChildren(), isClean()); + pageSpan_ = null; + } + return pageSpanBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter) + private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter(); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkPageFooter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ImageChunkFieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the blobAssetId field is set. + */ + boolean hasBlobAssetId(); + + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The blobAssetId. + */ + java.lang.String getBlobAssetId(); + + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for blobAssetId. + */ + com.google.protobuf.ByteString getBlobAssetIdBytes(); + + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the gcsUri field is set. + */ + boolean hasGcsUri(); + + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the dataUri field is set. + */ + boolean hasDataUri(); + + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataUri. + */ + java.lang.String getDataUri(); + + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataUri. + */ + com.google.protobuf.ByteString getDataUriBytes(); + + /** + * + * + *
+         * Annotation of the image chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + boolean hasAnnotations(); + + /** + * + * + *
+         * Annotation of the image chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + com.google.cloud.documentai.v1.Document.Annotations getAnnotations(); + + /** + * + * + *
+         * Annotation of the image chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder getAnnotationsOrBuilder(); + + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .ImageSourceCase + getImageSourceCase(); + } + + /** + * + * + *
+       * The image chunk field in the chunk.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField} + */ + public static final class ImageChunkField extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + ImageChunkFieldOrBuilder { + 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= */ "", + "ImageChunkField"); + } + + // Use ImageChunkField.newBuilder() to construct. + private ImageChunkField(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ImageChunkField() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .Builder.class); + } + + private int bitField0_; + private int imageSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object imageSource_; + + public enum ImageSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BLOB_ASSET_ID(1), + GCS_URI(2), + DATA_URI(3), + IMAGESOURCE_NOT_SET(0); + private final int value; + + private ImageSourceCase(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 ImageSourceCase valueOf(int value) { + return forNumber(value); + } + + public static ImageSourceCase forNumber(int value) { + switch (value) { + case 1: + return BLOB_ASSET_ID; + case 2: + return GCS_URI; + case 3: + return DATA_URI; + case 0: + return IMAGESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ImageSourceCase getImageSourceCase() { + return ImageSourceCase.forNumber(imageSourceCase_); + } + + public static final int BLOB_ASSET_ID_FIELD_NUMBER = 1; + + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the blobAssetId field is set. + */ + public boolean hasBlobAssetId() { + return imageSourceCase_ == 1; + } + + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The blobAssetId. + */ + public java.lang.String getBlobAssetId() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 1) { + ref = imageSource_; + } + if (ref instanceof java.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 (imageSourceCase_ == 1) { + imageSource_ = s; + } + return s; + } + } + + /** + * + * + *
+         * Optional. Asset id of the inline image. If set, find the image
+         * content in the blob_assets field.
+         * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for blobAssetId. + */ + public com.google.protobuf.ByteString getBlobAssetIdBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 1) { + ref = imageSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 1) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_URI_FIELD_NUMBER = 2; + + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the gcsUri field is set. + */ + public boolean hasGcsUri() { + return imageSourceCase_ == 2; + } + + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 2) { + ref = imageSource_; + } + if (ref instanceof java.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 (imageSourceCase_ == 2) { + imageSource_ = s; + } + return s; + } + } + + /** + * + * + *
+         * Optional. Google Cloud Storage uri of the image.
+         * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 2) { + ref = imageSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 2) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_URI_FIELD_NUMBER = 3; + + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the dataUri field is set. + */ + public boolean hasDataUri() { + return imageSourceCase_ == 3; + } + + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataUri. + */ + public java.lang.String getDataUri() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 3) { + ref = imageSource_; + } + if (ref instanceof java.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 (imageSourceCase_ == 3) { + imageSource_ = s; + } + return s; + } + } + + /** + * + * + *
+         * Optional. Data uri of the image.
+         * It is 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>
+         * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataUri. + */ + public com.google.protobuf.ByteString getDataUriBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 3) { + ref = imageSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 3) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + + /** + * + * + *
+         * Annotation of the image chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + @java.lang.Override + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+         * Annotation of the image chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + + /** + * + * + *
+         * Annotation of the image chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + + 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 (imageSourceCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, imageSource_); + } + if (imageSourceCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, imageSource_); + } + if (imageSourceCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, imageSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getAnnotations()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (imageSourceCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, imageSource_); + } + if (imageSourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, imageSource_); + } + if (imageSourceCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, imageSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAnnotations()); + } + 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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField other = + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) obj; + + if (hasAnnotations() != other.hasAnnotations()) return false; + if (hasAnnotations()) { + if (!getAnnotations().equals(other.getAnnotations())) return false; + } + if (!getImageSourceCase().equals(other.getImageSourceCase())) return false; + switch (imageSourceCase_) { + case 1: + if (!getBlobAssetId().equals(other.getBlobAssetId())) return false; + break; + case 2: + if (!getGcsUri().equals(other.getGcsUri())) return false; + break; + case 3: + if (!getDataUri().equals(other.getDataUri())) 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 (hasAnnotations()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotations().hashCode(); + } + switch (imageSourceCase_) { + case 1: + hash = (37 * hash) + BLOB_ASSET_ID_FIELD_NUMBER; + hash = (53 * hash) + getBlobAssetId().hashCode(); + break; + case 2: + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + break; + case 3: + hash = (37 * hash) + DATA_URI_FIELD_NUMBER; + hash = (53 * hash) + getDataUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + 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 image chunk field in the chunk.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + imageSourceCase_ = 0; + imageSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + build() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + buildPartial() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField result = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.annotations_ = + annotationsBuilder_ == null ? annotations_ : annotationsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + result) { + result.imageSourceCase_ = imageSourceCase_; + result.imageSource_ = this.imageSource_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) { + return mergeFrom( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField other) { + if (other + == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .getDefaultInstance()) return this; + if (other.hasAnnotations()) { + mergeAnnotations(other.getAnnotations()); + } + switch (other.getImageSourceCase()) { + case BLOB_ASSET_ID: + { + imageSourceCase_ = 1; + imageSource_ = other.imageSource_; + onChanged(); + break; + } + case GCS_URI: + { + imageSourceCase_ = 2; + imageSource_ = other.imageSource_; + onChanged(); + break; + } + case DATA_URI: + { + imageSourceCase_ = 3; + imageSource_ = other.imageSource_; + onChanged(); + break; + } + case IMAGESOURCE_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(); + imageSourceCase_ = 1; + imageSource_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + imageSourceCase_ = 2; + imageSource_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + imageSourceCase_ = 3; + imageSource_ = s; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetAnnotationsFieldBuilder().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 imageSourceCase_ = 0; + private java.lang.Object imageSource_; + + public ImageSourceCase getImageSourceCase() { + return ImageSourceCase.forNumber(imageSourceCase_); + } + + public Builder clearImageSource() { + imageSourceCase_ = 0; + imageSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the blobAssetId field is set. + */ + @java.lang.Override + public boolean hasBlobAssetId() { + return imageSourceCase_ == 1; + } + + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The blobAssetId. + */ + @java.lang.Override + public java.lang.String getBlobAssetId() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 1) { + ref = imageSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageSourceCase_ == 1) { + imageSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for blobAssetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlobAssetIdBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 1) { + ref = imageSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 1) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The blobAssetId to set. + * @return This builder for chaining. + */ + public Builder setBlobAssetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageSourceCase_ = 1; + imageSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBlobAssetId() { + if (imageSourceCase_ == 1) { + imageSourceCase_ = 0; + imageSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Optional. Asset id of the inline image. If set, find the image
+           * content in the blob_assets field.
+           * 
+ * + * string blob_asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for blobAssetId to set. + * @return This builder for chaining. + */ + public Builder setBlobAssetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageSourceCase_ = 1; + imageSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the gcsUri field is set. + */ + @java.lang.Override + public boolean hasGcsUri() { + return imageSourceCase_ == 2; + } + + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 2) { + ref = imageSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageSourceCase_ == 2) { + imageSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 2) { + ref = imageSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 2) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageSourceCase_ = 2; + imageSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + if (imageSourceCase_ == 2) { + imageSourceCase_ = 0; + imageSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Optional. Google Cloud Storage uri of the image.
+           * 
+ * + * string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageSourceCase_ = 2; + imageSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the dataUri field is set. + */ + @java.lang.Override + public boolean hasDataUri() { + return imageSourceCase_ == 3; + } + + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataUri. + */ + @java.lang.Override + public java.lang.String getDataUri() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 3) { + ref = imageSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageSourceCase_ == 3) { + imageSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataUriBytes() { + java.lang.Object ref = ""; + if (imageSourceCase_ == 3) { + ref = imageSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageSourceCase_ == 3) { + imageSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataUri to set. + * @return This builder for chaining. + */ + public Builder setDataUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageSourceCase_ = 3; + imageSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataUri() { + if (imageSourceCase_ == 3) { + imageSourceCase_ = 0; + imageSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Optional. Data uri of the image.
+           * It is 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>
+           * 
+ * + * string data_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for dataUri to set. + * @return This builder for chaining. + */ + public Builder setDataUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageSourceCase_ = 3; + imageSource_ = value; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return Whether the annotations field is set. + */ + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + * + * @return The annotations. + */ + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + if (annotationsBuilder_ == null) { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } else { + return annotationsBuilder_.getMessage(); + } + } + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder setAnnotations(com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotations_ = value; + } else { + annotationsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder setAnnotations( + com.google.cloud.documentai.v1.Document.Annotations.Builder builderForValue) { + if (annotationsBuilder_ == null) { + annotations_ = builderForValue.build(); + } else { + annotationsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder mergeAnnotations( + com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && annotations_ != null + && annotations_ + != com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance()) { + getAnnotationsBuilder().mergeFrom(value); + } else { + annotations_ = value; + } + } else { + annotationsBuilder_.mergeFrom(value); + } + if (annotations_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000008); + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public com.google.cloud.documentai.v1.Document.Annotations.Builder + getAnnotationsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetAnnotationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilder(); + } else { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + } + + /** + * + * + *
+           * Annotation of the image chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + internalGetAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder>( + getAnnotations(), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkField + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField(); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageChunkField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TableChunkFieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Annotation of the table chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + * + * @return Whether the annotations field is set. + */ + boolean hasAnnotations(); + + /** + * + * + *
+         * Annotation of the table chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + * + * @return The annotations. + */ + com.google.cloud.documentai.v1.Document.Annotations getAnnotations(); + + /** + * + * + *
+         * Annotation of the table chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder getAnnotationsOrBuilder(); + } + + /** + * + * + *
+       * The table chunk field in the chunk.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField} + */ + public static final class TableChunkField extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + TableChunkFieldOrBuilder { + 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= */ "", + "TableChunkField"); + } + + // Use TableChunkField.newBuilder() to construct. + private TableChunkField(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TableChunkField() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .Builder.class); + } + + private int bitField0_; + public static final int ANNOTATIONS_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1.Document.Annotations annotations_; + + /** + * + * + *
+         * Annotation of the table chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + * + * @return Whether the annotations field is set. + */ + @java.lang.Override + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+         * Annotation of the table chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + * + * @return The annotations. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + + /** + * + * + *
+         * Annotation of the table chunk field.
+         * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + + 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, getAnnotations()); + } + 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, getAnnotations()); + } + 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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField other = + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) obj; + + if (hasAnnotations() != other.hasAnnotations()) return false; + if (hasAnnotations()) { + if (!getAnnotations().equals(other.getAnnotations())) 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 (hasAnnotations()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotations().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + 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 table chunk field in the chunk.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + build() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + buildPartial() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField result = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.annotations_ = + annotationsBuilder_ == null ? annotations_ : annotationsBuilder_.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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) { + return mergeFrom( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField other) { + if (other + == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .getDefaultInstance()) return this; + if (other.hasAnnotations()) { + mergeAnnotations(other.getAnnotations()); + } + 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( + internalGetAnnotationsFieldBuilder().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.documentai.v1.Document.Annotations annotations_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + * + * @return Whether the annotations field is set. + */ + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + * + * @return The annotations. + */ + public com.google.cloud.documentai.v1.Document.Annotations getAnnotations() { + if (annotationsBuilder_ == null) { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } else { + return annotationsBuilder_.getMessage(); + } + } + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + public Builder setAnnotations(com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotations_ = value; + } else { + annotationsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + public Builder setAnnotations( + com.google.cloud.documentai.v1.Document.Annotations.Builder builderForValue) { + if (annotationsBuilder_ == null) { + annotations_ = builderForValue.build(); + } else { + annotationsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + public Builder mergeAnnotations( + com.google.cloud.documentai.v1.Document.Annotations value) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && annotations_ != null + && annotations_ + != com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance()) { + getAnnotationsBuilder().mergeFrom(value); + } else { + annotations_ = value; + } + } else { + annotationsBuilder_.mergeFrom(value); + } + if (annotations_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000001); + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + public com.google.cloud.documentai.v1.Document.Annotations.Builder + getAnnotationsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAnnotationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + public com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilder(); + } else { + return annotations_ == null + ? com.google.cloud.documentai.v1.Document.Annotations.getDefaultInstance() + : annotations_; + } + } + + /** + * + * + *
+           * Annotation of the table chunk field.
+           * 
+ * + * .google.cloud.documentai.v1.Document.Annotations annotations = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder> + internalGetAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.Annotations, + com.google.cloud.documentai.v1.Document.Annotations.Builder, + com.google.cloud.documentai.v1.Document.AnnotationsOrBuilder>( + getAnnotations(), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkField + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField(); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableChunkField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChunkFieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * The image chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + * + * @return Whether the imageChunkField field is set. + */ + boolean hasImageChunkField(); + + /** + * + * + *
+         * The image chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + * + * @return The imageChunkField. + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + getImageChunkField(); + + /** + * + * + *
+         * The image chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkFieldOrBuilder + getImageChunkFieldOrBuilder(); + + /** + * + * + *
+         * The table chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + * + * @return Whether the tableChunkField field is set. + */ + boolean hasTableChunkField(); + + /** + * + * + *
+         * The table chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + * + * @return The tableChunkField. + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + getTableChunkField(); + + /** + * + * + *
+         * The table chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkFieldOrBuilder + getTableChunkFieldOrBuilder(); + + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.FieldTypeCase + getFieldTypeCase(); + } + + /** + * + * + *
+       * The chunk field in the chunk. A chunk field could be one of the various
+       * types (for example, image, table) supported.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField} + */ + public static final class ChunkField extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) + ChunkFieldOrBuilder { + 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= */ "", + "ChunkField"); + } + + // Use ChunkField.newBuilder() to construct. + private ChunkField(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChunkField() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder + .class); + } + + private int fieldTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object fieldType_; + + public enum FieldTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IMAGE_CHUNK_FIELD(1), + TABLE_CHUNK_FIELD(2), + FIELDTYPE_NOT_SET(0); + private final int value; + + private FieldTypeCase(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 FieldTypeCase valueOf(int value) { + return forNumber(value); + } + + public static FieldTypeCase forNumber(int value) { + switch (value) { + case 1: + return IMAGE_CHUNK_FIELD; + case 2: + return TABLE_CHUNK_FIELD; + case 0: + return FIELDTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FieldTypeCase getFieldTypeCase() { + return FieldTypeCase.forNumber(fieldTypeCase_); + } + + public static final int IMAGE_CHUNK_FIELD_FIELD_NUMBER = 1; + + /** + * + * + *
+         * The image chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + * + * @return Whether the imageChunkField field is set. + */ + @java.lang.Override + public boolean hasImageChunkField() { + return fieldTypeCase_ == 1; + } + + /** + * + * + *
+         * The image chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + * + * @return The imageChunkField. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + getImageChunkField() { + if (fieldTypeCase_ == 1) { + return (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + fieldType_; + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .getDefaultInstance(); + } + + /** + * + * + *
+         * The image chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkFieldOrBuilder + getImageChunkFieldOrBuilder() { + if (fieldTypeCase_ == 1) { + return (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + fieldType_; + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .getDefaultInstance(); + } + + public static final int TABLE_CHUNK_FIELD_FIELD_NUMBER = 2; + + /** + * + * + *
+         * The table chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + * + * @return Whether the tableChunkField field is set. + */ + @java.lang.Override + public boolean hasTableChunkField() { + return fieldTypeCase_ == 2; + } + + /** + * + * + *
+         * The table chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + * + * @return The tableChunkField. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + getTableChunkField() { + if (fieldTypeCase_ == 2) { + return (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + fieldType_; + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .getDefaultInstance(); + } + + /** + * + * + *
+         * The table chunk field in the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkFieldOrBuilder + getTableChunkFieldOrBuilder() { + if (fieldTypeCase_ == 2) { + return (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + fieldType_; + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .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 (fieldTypeCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + fieldType_); + } + if (fieldTypeCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + fieldType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fieldTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + fieldType_); + } + if (fieldTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + fieldType_); + } + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField other = + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) obj; + + if (!getFieldTypeCase().equals(other.getFieldTypeCase())) return false; + switch (fieldTypeCase_) { + case 1: + if (!getImageChunkField().equals(other.getImageChunkField())) return false; + break; + case 2: + if (!getTableChunkField().equals(other.getTableChunkField())) 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 (fieldTypeCase_) { + case 1: + hash = (37 * hash) + IMAGE_CHUNK_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getImageChunkField().hashCode(); + break; + case 2: + hash = (37 * hash) + TABLE_CHUNK_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getTableChunkField().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField 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 chunk field in the chunk. A chunk field could be one of the various
+         * types (for example, image, table) supported.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder + .class); + } + + // Construct using + // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (imageChunkFieldBuilder_ != null) { + imageChunkFieldBuilder_.clear(); + } + if (tableChunkFieldBuilder_ != null) { + tableChunkFieldBuilder_.clear(); + } + fieldTypeCase_ = 0; + fieldType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField build() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + buildPartial() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField result = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField result) { + result.fieldTypeCase_ = fieldTypeCase_; + result.fieldType_ = this.fieldType_; + if (fieldTypeCase_ == 1 && imageChunkFieldBuilder_ != null) { + result.fieldType_ = imageChunkFieldBuilder_.build(); + } + if (fieldTypeCase_ == 2 && tableChunkFieldBuilder_ != null) { + result.fieldType_ = tableChunkFieldBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) { + return mergeFrom( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField other) { + if (other + == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + .getDefaultInstance()) return this; + switch (other.getFieldTypeCase()) { + case IMAGE_CHUNK_FIELD: + { + mergeImageChunkField(other.getImageChunkField()); + break; + } + case TABLE_CHUNK_FIELD: + { + mergeTableChunkField(other.getTableChunkField()); + break; + } + case FIELDTYPE_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( + internalGetImageChunkFieldFieldBuilder().getBuilder(), extensionRegistry); + fieldTypeCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetTableChunkFieldFieldBuilder().getBuilder(), extensionRegistry); + fieldTypeCase_ = 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 fieldTypeCase_ = 0; + private java.lang.Object fieldType_; + + public FieldTypeCase getFieldTypeCase() { + return FieldTypeCase.forNumber(fieldTypeCase_); + } + + public Builder clearFieldType() { + fieldTypeCase_ = 0; + fieldType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkFieldOrBuilder> + imageChunkFieldBuilder_; + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + * + * @return Whether the imageChunkField field is set. + */ + @java.lang.Override + public boolean hasImageChunkField() { + return fieldTypeCase_ == 1; + } + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + * + * @return The imageChunkField. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + getImageChunkField() { + if (imageChunkFieldBuilder_ == null) { + if (fieldTypeCase_ == 1) { + return (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkField) + fieldType_; + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .getDefaultInstance(); + } else { + if (fieldTypeCase_ == 1) { + return imageChunkFieldBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .getDefaultInstance(); + } + } + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + public Builder setImageChunkField( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField value) { + if (imageChunkFieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldType_ = value; + onChanged(); + } else { + imageChunkFieldBuilder_.setMessage(value); + } + fieldTypeCase_ = 1; + return this; + } + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + public Builder setImageChunkField( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.Builder + builderForValue) { + if (imageChunkFieldBuilder_ == null) { + fieldType_ = builderForValue.build(); + onChanged(); + } else { + imageChunkFieldBuilder_.setMessage(builderForValue.build()); + } + fieldTypeCase_ = 1; + return this; + } + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + public Builder mergeImageChunkField( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField value) { + if (imageChunkFieldBuilder_ == null) { + if (fieldTypeCase_ == 1 + && fieldType_ + != com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkField.getDefaultInstance()) { + fieldType_ = + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .newBuilder( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkField) + fieldType_) + .mergeFrom(value) + .buildPartial(); + } else { + fieldType_ = value; + } + onChanged(); + } else { + if (fieldTypeCase_ == 1) { + imageChunkFieldBuilder_.mergeFrom(value); + } else { + imageChunkFieldBuilder_.setMessage(value); + } + } + fieldTypeCase_ = 1; + return this; + } + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + public Builder clearImageChunkField() { + if (imageChunkFieldBuilder_ == null) { + if (fieldTypeCase_ == 1) { + fieldTypeCase_ = 0; + fieldType_ = null; + onChanged(); + } + } else { + if (fieldTypeCase_ == 1) { + fieldTypeCase_ = 0; + fieldType_ = null; + } + imageChunkFieldBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .Builder + getImageChunkFieldBuilder() { + return internalGetImageChunkFieldFieldBuilder().getBuilder(); + } + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkFieldOrBuilder + getImageChunkFieldOrBuilder() { + if ((fieldTypeCase_ == 1) && (imageChunkFieldBuilder_ != null)) { + return imageChunkFieldBuilder_.getMessageOrBuilder(); + } else { + if (fieldTypeCase_ == 1) { + return (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkField) + fieldType_; + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .getDefaultInstance(); + } + } + + /** + * + * + *
+           * The image chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField image_chunk_field = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkFieldOrBuilder> + internalGetImageChunkFieldFieldBuilder() { + if (imageChunkFieldBuilder_ == null) { + if (!(fieldTypeCase_ == 1)) { + fieldType_ = + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .getDefaultInstance(); + } + imageChunkFieldBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkFieldOrBuilder>( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ImageChunkField) + fieldType_, + getParentForChildren(), + isClean()); + fieldType_ = null; + } + fieldTypeCase_ = 1; + onChanged(); + return imageChunkFieldBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkFieldOrBuilder> + tableChunkFieldBuilder_; + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + * + * @return Whether the tableChunkField field is set. + */ + @java.lang.Override + public boolean hasTableChunkField() { + return fieldTypeCase_ == 2; + } + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + * + * @return The tableChunkField. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + getTableChunkField() { + if (tableChunkFieldBuilder_ == null) { + if (fieldTypeCase_ == 2) { + return (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkField) + fieldType_; + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .getDefaultInstance(); + } else { + if (fieldTypeCase_ == 2) { + return tableChunkFieldBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .getDefaultInstance(); + } + } + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + public Builder setTableChunkField( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField value) { + if (tableChunkFieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldType_ = value; + onChanged(); + } else { + tableChunkFieldBuilder_.setMessage(value); + } + fieldTypeCase_ = 2; + return this; + } + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + public Builder setTableChunkField( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.Builder + builderForValue) { + if (tableChunkFieldBuilder_ == null) { + fieldType_ = builderForValue.build(); + onChanged(); + } else { + tableChunkFieldBuilder_.setMessage(builderForValue.build()); + } + fieldTypeCase_ = 2; + return this; + } + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + public Builder mergeTableChunkField( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField value) { + if (tableChunkFieldBuilder_ == null) { + if (fieldTypeCase_ == 2 + && fieldType_ + != com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkField.getDefaultInstance()) { + fieldType_ = + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .newBuilder( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkField) + fieldType_) + .mergeFrom(value) + .buildPartial(); + } else { + fieldType_ = value; + } + onChanged(); + } else { + if (fieldTypeCase_ == 2) { + tableChunkFieldBuilder_.mergeFrom(value); + } else { + tableChunkFieldBuilder_.setMessage(value); + } + } + fieldTypeCase_ = 2; + return this; + } + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + public Builder clearTableChunkField() { + if (tableChunkFieldBuilder_ == null) { + if (fieldTypeCase_ == 2) { + fieldTypeCase_ = 0; + fieldType_ = null; + onChanged(); + } + } else { + if (fieldTypeCase_ == 2) { + fieldTypeCase_ = 0; + fieldType_ = null; + } + tableChunkFieldBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .Builder + getTableChunkFieldBuilder() { + return internalGetTableChunkFieldFieldBuilder().getBuilder(); + } + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkFieldOrBuilder + getTableChunkFieldOrBuilder() { + if ((fieldTypeCase_ == 2) && (tableChunkFieldBuilder_ != null)) { + return tableChunkFieldBuilder_.getMessageOrBuilder(); + } else { + if (fieldTypeCase_ == 2) { + return (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkField) + fieldType_; + } + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .getDefaultInstance(); + } + } + + /** + * + * + *
+           * The table chunk field in the chunk.
+           * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField table_chunk_field = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkFieldOrBuilder> + internalGetTableChunkFieldFieldBuilder() { + if (tableChunkFieldBuilder_ == null) { + if (!(fieldTypeCase_ == 2)) { + fieldType_ = + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .getDefaultInstance(); + } + tableChunkFieldBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkFieldOrBuilder>( + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .TableChunkField) + fieldType_, + getParentForChildren(), + isClean()); + fieldType_ = null; + } + fieldTypeCase_ = 2; + onChanged(); + return tableChunkFieldBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) + private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkField + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField(); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CHUNK_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object chunkId_ = ""; + + /** + * + * + *
+       * ID of the chunk.
+       * 
+ * + * string chunk_id = 1; + * + * @return The chunkId. + */ + @java.lang.Override + public java.lang.String getChunkId() { + java.lang.Object ref = chunkId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chunkId_ = s; + return s; + } + } + + /** + * + * + *
+       * ID of the chunk.
+       * 
+ * + * string chunk_id = 1; + * + * @return The bytes for chunkId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChunkIdBytes() { + java.lang.Object ref = chunkId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_BLOCK_IDS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sourceBlockIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+       * Unused.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @return A list containing the sourceBlockIds. + */ + public com.google.protobuf.ProtocolStringList getSourceBlockIdsList() { + return sourceBlockIds_; + } + + /** + * + * + *
+       * Unused.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @return The count of sourceBlockIds. + */ + public int getSourceBlockIdsCount() { + return sourceBlockIds_.size(); + } + + /** + * + * + *
+       * Unused.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the element to return. + * @return The sourceBlockIds at the given index. + */ + public java.lang.String getSourceBlockIds(int index) { + return sourceBlockIds_.get(index); + } + + /** + * + * + *
+       * Unused.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the sourceBlockIds at the given index. + */ + public com.google.protobuf.ByteString getSourceBlockIdsBytes(int index) { + return sourceBlockIds_.getByteString(index); + } + + public static final int CONTENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
+       * Text content of the chunk.
+       * 
+ * + * 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; + } + } + + /** + * + * + *
+       * Text content of the chunk.
+       * 
+ * + * 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 PAGE_SPAN_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan pageSpan_; + + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return Whether the pageSpan field is set. + */ + @java.lang.Override + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return The pageSpan. + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder + getPageSpanOrBuilder() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + + public static final int PAGE_HEADERS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader> + pageHeaders_; + + /** + * + * + *
+       * Page headers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader> + getPageHeadersList() { + return pageHeaders_; + } + + /** + * + * + *
+       * Page headers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeaderOrBuilder> + getPageHeadersOrBuilderList() { + return pageHeaders_; + } + + /** + * + * + *
+       * Page headers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + @java.lang.Override + public int getPageHeadersCount() { + return pageHeaders_.size(); + } + + /** + * + * + *
+       * Page headers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + getPageHeaders(int index) { + return pageHeaders_.get(index); + } + + /** + * + * + *
+       * Page headers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeaderOrBuilder + getPageHeadersOrBuilder(int index) { + return pageHeaders_.get(index); + } + + public static final int PAGE_FOOTERS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter> + pageFooters_; + + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + @java.lang.Override public java.util.List< com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter> getPageFootersList() { return pageFooters_; } - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooterOrBuilder> - getPageFootersOrBuilderList() { - return pageFooters_; - } + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooterOrBuilder> + getPageFootersOrBuilderList() { + return pageFooters_; + } + + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + @java.lang.Override + public int getPageFootersCount() { + return pageFooters_.size(); + } + + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + getPageFooters(int index) { + return pageFooters_.get(index); + } + + /** + * + * + *
+       * Page footers associated with the chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooterOrBuilder + getPageFootersOrBuilder(int index) { + return pageFooters_.get(index); + } + + public static final int CHUNK_FIELDS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField> + chunkFields_; + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField> + getChunkFieldsList() { + return chunkFields_; + } + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkFieldOrBuilder> + getChunkFieldsOrBuilderList() { + return chunkFields_; + } + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + @java.lang.Override + public int getChunkFieldsCount() { + return chunkFields_.size(); + } + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + getChunkFields(int index) { + return chunkFields_.get(index); + } + + /** + * + * + *
+       * Chunk fields inside this chunk.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkFieldOrBuilder + getChunkFieldsOrBuilder(int index) { + return chunkFields_.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(chunkId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, chunkId_); + } + for (int i = 0; i < sourceBlockIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sourceBlockIds_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getPageSpan()); + } + for (int i = 0; i < pageHeaders_.size(); i++) { + output.writeMessage(5, pageHeaders_.get(i)); + } + for (int i = 0; i < pageFooters_.size(); i++) { + output.writeMessage(6, pageFooters_.get(i)); + } + for (int i = 0; i < chunkFields_.size(); i++) { + output.writeMessage(7, chunkFields_.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(chunkId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, chunkId_); + } + { + int dataSize = 0; + for (int i = 0; i < sourceBlockIds_.size(); i++) { + dataSize += computeStringSizeNoTag(sourceBlockIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getSourceBlockIdsList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPageSpan()); + } + for (int i = 0; i < pageHeaders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, pageHeaders_.get(i)); + } + for (int i = 0; i < pageFooters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, pageFooters_.get(i)); + } + for (int i = 0; i < chunkFields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, chunkFields_.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.documentai.v1.Document.ChunkedDocument.Chunk)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk other = + (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) obj; + + if (!getChunkId().equals(other.getChunkId())) return false; + if (!getSourceBlockIdsList().equals(other.getSourceBlockIdsList())) return false; + if (!getContent().equals(other.getContent())) return false; + if (hasPageSpan() != other.hasPageSpan()) return false; + if (hasPageSpan()) { + if (!getPageSpan().equals(other.getPageSpan())) return false; + } + if (!getPageHeadersList().equals(other.getPageHeadersList())) return false; + if (!getPageFootersList().equals(other.getPageFootersList())) return false; + if (!getChunkFieldsList().equals(other.getChunkFieldsList())) 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) + CHUNK_ID_FIELD_NUMBER; + hash = (53 * hash) + getChunkId().hashCode(); + if (getSourceBlockIdsCount() > 0) { + hash = (37 * hash) + SOURCE_BLOCK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSourceBlockIdsList().hashCode(); + } + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasPageSpan()) { + hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getPageSpan().hashCode(); + } + if (getPageHeadersCount() > 0) { + hash = (37 * hash) + PAGE_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getPageHeadersList().hashCode(); + } + if (getPageFootersCount() > 0) { + hash = (37 * hash) + PAGE_FOOTERS_FIELD_NUMBER; + hash = (53 * hash) + getPageFootersList().hashCode(); + } + if (getChunkFieldsCount() > 0) { + hash = (37 * hash) + CHUNK_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getChunkFieldsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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.documentai.v1.Document.ChunkedDocument.Chunk + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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.documentai.v1.Document.ChunkedDocument.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; + } + + /** + * + * + *
+       * Represents a chunk.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument.Chunk} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) + com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1.Document.ChunkedDocument.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) { + internalGetPageSpanFieldBuilder(); + internalGetPageHeadersFieldBuilder(); + internalGetPageFootersFieldBuilder(); + internalGetChunkFieldsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + chunkId_ = ""; + sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + content_ = ""; + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + if (pageHeadersBuilder_ == null) { + pageHeaders_ = java.util.Collections.emptyList(); + } else { + pageHeaders_ = null; + pageHeadersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (pageFootersBuilder_ == null) { + pageFooters_ = java.util.Collections.emptyList(); + } else { + pageFooters_ = null; + pageFootersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (chunkFieldsBuilder_ == null) { + chunkFields_ = java.util.Collections.emptyList(); + } else { + chunkFields_ = null; + chunkFieldsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk build() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk buildPartial() { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk result = + new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk result) { + if (pageHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + pageHeaders_ = java.util.Collections.unmodifiableList(pageHeaders_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.pageHeaders_ = pageHeaders_; + } else { + result.pageHeaders_ = pageHeadersBuilder_.build(); + } + if (pageFootersBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + pageFooters_ = java.util.Collections.unmodifiableList(pageFooters_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.pageFooters_ = pageFooters_; + } else { + result.pageFooters_ = pageFootersBuilder_.build(); + } + if (chunkFieldsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + chunkFields_ = java.util.Collections.unmodifiableList(chunkFields_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.chunkFields_ = chunkFields_; + } else { + result.chunkFields_ = chunkFieldsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.chunkId_ = chunkId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + sourceBlockIds_.makeImmutable(); + result.sourceBlockIds_ = sourceBlockIds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.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.documentai.v1.Document.ChunkedDocument.Chunk) { + return mergeFrom((com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk other) { + if (other + == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.getDefaultInstance()) + return this; + if (!other.getChunkId().isEmpty()) { + chunkId_ = other.chunkId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.sourceBlockIds_.isEmpty()) { + if (sourceBlockIds_.isEmpty()) { + sourceBlockIds_ = other.sourceBlockIds_; + bitField0_ |= 0x00000002; + } else { + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.addAll(other.sourceBlockIds_); + } + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasPageSpan()) { + mergePageSpan(other.getPageSpan()); + } + if (pageHeadersBuilder_ == null) { + if (!other.pageHeaders_.isEmpty()) { + if (pageHeaders_.isEmpty()) { + pageHeaders_ = other.pageHeaders_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensurePageHeadersIsMutable(); + pageHeaders_.addAll(other.pageHeaders_); + } + onChanged(); + } + } else { + if (!other.pageHeaders_.isEmpty()) { + if (pageHeadersBuilder_.isEmpty()) { + pageHeadersBuilder_.dispose(); + pageHeadersBuilder_ = null; + pageHeaders_ = other.pageHeaders_; + bitField0_ = (bitField0_ & ~0x00000010); + pageHeadersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPageHeadersFieldBuilder() + : null; + } else { + pageHeadersBuilder_.addAllMessages(other.pageHeaders_); + } + } + } + if (pageFootersBuilder_ == null) { + if (!other.pageFooters_.isEmpty()) { + if (pageFooters_.isEmpty()) { + pageFooters_ = other.pageFooters_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensurePageFootersIsMutable(); + pageFooters_.addAll(other.pageFooters_); + } + onChanged(); + } + } else { + if (!other.pageFooters_.isEmpty()) { + if (pageFootersBuilder_.isEmpty()) { + pageFootersBuilder_.dispose(); + pageFootersBuilder_ = null; + pageFooters_ = other.pageFooters_; + bitField0_ = (bitField0_ & ~0x00000020); + pageFootersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPageFootersFieldBuilder() + : null; + } else { + pageFootersBuilder_.addAllMessages(other.pageFooters_); + } + } + } + if (chunkFieldsBuilder_ == null) { + if (!other.chunkFields_.isEmpty()) { + if (chunkFields_.isEmpty()) { + chunkFields_ = other.chunkFields_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureChunkFieldsIsMutable(); + chunkFields_.addAll(other.chunkFields_); + } + onChanged(); + } + } else { + if (!other.chunkFields_.isEmpty()) { + if (chunkFieldsBuilder_.isEmpty()) { + chunkFieldsBuilder_.dispose(); + chunkFieldsBuilder_ = null; + chunkFields_ = other.chunkFields_; + bitField0_ = (bitField0_ & ~0x00000040); + chunkFieldsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChunkFieldsFieldBuilder() + : null; + } else { + chunkFieldsBuilder_.addAllMessages(other.chunkFields_); + } + } + } + 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: + { + chunkId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.add(s); + break; + } // case 18 + case 26: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetPageSpanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + m = + input.readMessage( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeader.parser(), + extensionRegistry); + if (pageHeadersBuilder_ == null) { + ensurePageHeadersIsMutable(); + pageHeaders_.add(m); + } else { + pageHeadersBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + m = + input.readMessage( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooter.parser(), + extensionRegistry); + if (pageFootersBuilder_ == null) { + ensurePageFootersIsMutable(); + pageFooters_.add(m); + } else { + pageFootersBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField m = + input.readMessage( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + .parser(), + extensionRegistry); + if (chunkFieldsBuilder_ == null) { + ensureChunkFieldsIsMutable(); + chunkFields_.add(m); + } else { + chunkFieldsBuilder_.addMessage(m); + } + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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 chunkId_ = ""; + + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @return The chunkId. + */ + public java.lang.String getChunkId() { + java.lang.Object ref = chunkId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chunkId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @return The bytes for chunkId. + */ + public com.google.protobuf.ByteString getChunkIdBytes() { + java.lang.Object ref = chunkId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @param value The chunkId to set. + * @return This builder for chaining. + */ + public Builder setChunkId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + chunkId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearChunkId() { + chunkId_ = getDefaultInstance().getChunkId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @param value The bytes for chunkId to set. + * @return This builder for chaining. + */ + public Builder setChunkIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + chunkId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList sourceBlockIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - @java.lang.Override - public int getPageFootersCount() { - return pageFooters_.size(); - } + private void ensureSourceBlockIdsIsMutable() { + if (!sourceBlockIds_.isModifiable()) { + sourceBlockIds_ = new com.google.protobuf.LazyStringArrayList(sourceBlockIds_); + } + bitField0_ |= 0x00000002; + } - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - getPageFooters(int index) { - return pageFooters_.get(index); - } + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @return A list containing the sourceBlockIds. + */ + public com.google.protobuf.ProtocolStringList getSourceBlockIdsList() { + sourceBlockIds_.makeImmutable(); + return sourceBlockIds_; + } - /** - * - * - *
-       * Page footers associated with the chunk.
-       * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooterOrBuilder - getPageFootersOrBuilder(int index) { - return pageFooters_.get(index); - } + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @return The count of sourceBlockIds. + */ + public int getSourceBlockIdsCount() { + return sourceBlockIds_.size(); + } - private byte memoizedIsInitialized = -1; + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the element to return. + * @return The sourceBlockIds at the given index. + */ + public java.lang.String getSourceBlockIds(int index) { + return sourceBlockIds_.get(index); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the sourceBlockIds at the given index. + */ + public com.google.protobuf.ByteString getSourceBlockIdsBytes(int index) { + return sourceBlockIds_.getByteString(index); + } - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index to set the value at. + * @param value The sourceBlockIds to set. + * @return This builder for chaining. + */ + public Builder setSourceBlockIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunkId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, chunkId_); + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param value The sourceBlockIds to add. + * @return This builder for chaining. + */ + public Builder addSourceBlockIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; } - for (int i = 0; i < sourceBlockIds_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, sourceBlockIds_.getRaw(i)); + + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param values The sourceBlockIds to add. + * @return This builder for chaining. + */ + public Builder addAllSourceBlockIds(java.lang.Iterable values) { + ensureSourceBlockIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceBlockIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, content_); + + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @return This builder for chaining. + */ + public Builder clearSourceBlockIds() { + sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getPageSpan()); + + /** + * + * + *
+         * Unused.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param value The bytes of the sourceBlockIds to add. + * @return This builder for chaining. + */ + public Builder addSourceBlockIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; } - for (int i = 0; i < pageHeaders_.size(); i++) { - output.writeMessage(5, pageHeaders_.get(i)); + + private java.lang.Object content_ = ""; + + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * 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; + } } - for (int i = 0; i < pageFooters_.size(); i++) { - output.writeMessage(6, pageFooters_.get(i)); + + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * 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; + } } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * 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; + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunkId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, chunkId_); + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * string content = 3; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; } - { - int dataSize = 0; - for (int i = 0; i < sourceBlockIds_.size(); i++) { - dataSize += computeStringSizeNoTag(sourceBlockIds_.getRaw(i)); + + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * 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(); } - size += dataSize; - size += 1 * getSourceBlockIdsList().size(); + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, content_); + + private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + pageSpan_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder> + pageSpanBuilder_; + + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return Whether the pageSpan field is set. + */ + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000008) != 0); } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPageSpan()); + + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return The pageSpan. + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan() { + if (pageSpanBuilder_ == null) { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } else { + return pageSpanBuilder_.getMessage(); + } } - for (int i = 0; i < pageHeaders_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, pageHeaders_.get(i)); + + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { + if (pageSpanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageSpan_ = value; + } else { + pageSpanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; } - for (int i = 0; i < pageFooters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, pageFooters_.get(i)); + + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder + builderForValue) { + if (pageSpanBuilder_ == null) { + pageSpan_ = builderForValue.build(); + } else { + pageSpanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public Builder mergePageSpan( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { + if (pageSpanBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && pageSpan_ != null + && pageSpan_ + != com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance()) { + getPageSpanBuilder().mergeFrom(value); + } else { + pageSpan_ = value; + } + } else { + pageSpanBuilder_.mergeFrom(value); + } + if (pageSpan_ != null) { + bitField0_ |= 0x00000008; + 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.documentai.v1.Document.ChunkedDocument.Chunk)) { - return super.equals(obj); + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public Builder clearPageSpan() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + onChanged(); + return this; } - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk other = - (com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) obj; - if (!getChunkId().equals(other.getChunkId())) return false; - if (!getSourceBlockIdsList().equals(other.getSourceBlockIdsList())) return false; - if (!getContent().equals(other.getContent())) return false; - if (hasPageSpan() != other.hasPageSpan()) return false; - if (hasPageSpan()) { - if (!getPageSpan().equals(other.getPageSpan())) return false; + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder + getPageSpanBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetPageSpanFieldBuilder().getBuilder(); } - if (!getPageHeadersList().equals(other.getPageHeadersList())) return false; - if (!getPageFootersList().equals(other.getPageFootersList())) 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) + CHUNK_ID_FIELD_NUMBER; - hash = (53 * hash) + getChunkId().hashCode(); - if (getSourceBlockIdsCount() > 0) { - hash = (37 * hash) + SOURCE_BLOCK_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSourceBlockIdsList().hashCode(); - } - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasPageSpan()) { - hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; - hash = (53 * hash) + getPageSpan().hashCode(); - } - if (getPageHeadersCount() > 0) { - hash = (37 * hash) + PAGE_HEADERS_FIELD_NUMBER; - hash = (53 * hash) + getPageHeadersList().hashCode(); - } - if (getPageFootersCount() > 0) { - hash = (37 * hash) + PAGE_FOOTERS_FIELD_NUMBER; - hash = (53 * hash) + getPageFootersList().hashCode(); + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder + getPageSpanOrBuilder() { + if (pageSpanBuilder_ != null) { + return pageSpanBuilder_.getMessageOrBuilder(); + } else { + return pageSpan_ == null + ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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.documentai.v1.Document.ChunkedDocument.Chunk - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder> + internalGetPageSpanFieldBuilder() { + if (pageSpanBuilder_ == null) { + pageSpanBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder>(getPageSpan(), getParentForChildren(), isClean()); + pageSpan_ = null; + } + return pageSpanBuilder_; + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - 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.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader> + pageHeaders_ = java.util.Collections.emptyList(); - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private void ensurePageHeadersIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + pageHeaders_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader>( + pageHeaders_); + bitField0_ |= 0x00000010; + } + } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.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); - } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeaderOrBuilder> + pageHeadersBuilder_; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader> + getPageHeadersList() { + if (pageHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(pageHeaders_); + } else { + return pageHeadersBuilder_.getMessageList(); + } + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public int getPageHeadersCount() { + if (pageHeadersBuilder_ == null) { + return pageHeaders_.size(); + } else { + return pageHeadersBuilder_.getCount(); + } + } - public static Builder newBuilder( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + getPageHeaders(int index) { + if (pageHeadersBuilder_ == null) { + return pageHeaders_.get(index); + } else { + return pageHeadersBuilder_.getMessage(index); + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder setPageHeaders( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader value) { + if (pageHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageHeadersIsMutable(); + pageHeaders_.set(index, value); + onChanged(); + } else { + pageHeadersBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder setPageHeaders( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder + builderForValue) { + if (pageHeadersBuilder_ == null) { + ensurePageHeadersIsMutable(); + pageHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + pageHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - /** - * - * - *
-       * Represents a chunk.
-       * 
- * - * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument.Chunk} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) - com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor; + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder addPageHeaders( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader value) { + if (pageHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageHeadersIsMutable(); + pageHeaders_.add(value); + onChanged(); + } else { + pageHeadersBuilder_.addMessage(value); + } + return this; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder.class); + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder addPageHeaders( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader value) { + if (pageHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageHeadersIsMutable(); + pageHeaders_.add(index, value); + onChanged(); + } else { + pageHeadersBuilder_.addMessage(index, value); + } + return this; } - // Construct using - // com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder addPageHeaders( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder + builderForValue) { + if (pageHeadersBuilder_ == null) { + ensurePageHeadersIsMutable(); + pageHeaders_.add(builderForValue.build()); + onChanged(); + } else { + pageHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder addPageHeaders( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder + builderForValue) { + if (pageHeadersBuilder_ == null) { + ensurePageHeadersIsMutable(); + pageHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + pageHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetPageSpanFieldBuilder(); - internalGetPageHeadersFieldBuilder(); - internalGetPageFootersFieldBuilder(); + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder addAllPageHeaders( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeader> + values) { + if (pageHeadersBuilder_ == null) { + ensurePageHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageHeaders_); + onChanged(); + } else { + pageHeadersBuilder_.addAllMessages(values); } + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - chunkId_ = ""; - sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - content_ = ""; - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder clearPageHeaders() { if (pageHeadersBuilder_ == null) { pageHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); } else { - pageHeaders_ = null; pageHeadersBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); - if (pageFootersBuilder_ == null) { - pageFooters_ = java.util.Collections.emptyList(); + return this; + } + + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public Builder removePageHeaders(int index) { + if (pageHeadersBuilder_ == null) { + ensurePageHeadersIsMutable(); + pageHeaders_.remove(index); + onChanged(); } else { - pageFooters_ = null; - pageFootersBuilder_.clear(); + pageHeadersBuilder_.remove(index); } - bitField0_ = (bitField0_ & ~0x00000020); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor; + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder + getPageHeadersBuilder(int index) { + return internalGetPageHeadersFieldBuilder().getBuilder(index); } - @java.lang.Override + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - getDefaultInstanceForType() { - return com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk build() { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + .ChunkPageHeaderOrBuilder + getPageHeadersOrBuilder(int index) { + if (pageHeadersBuilder_ == null) { + return pageHeaders_.get(index); + } else { + return pageHeadersBuilder_.getMessageOrBuilder(index); } - return result; } - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk buildPartial() { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk result = - new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeaderOrBuilder> + getPageHeadersOrBuilderList() { + if (pageHeadersBuilder_ != null) { + return pageHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pageHeaders_); } - onBuilt(); - return result; } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk result) { - if (pageHeadersBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - pageHeaders_ = java.util.Collections.unmodifiableList(pageHeaders_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.pageHeaders_ = pageHeaders_; - } else { - result.pageHeaders_ = pageHeadersBuilder_.build(); - } - if (pageFootersBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - pageFooters_ = java.util.Collections.unmodifiableList(pageFooters_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.pageFooters_ = pageFooters_; - } else { - result.pageFooters_ = pageFootersBuilder_.build(); - } + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder + addPageHeadersBuilder() { + return internalGetPageHeadersFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .getDefaultInstance()); } - private void buildPartial0( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.chunkId_ = chunkId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - sourceBlockIds_.makeImmutable(); - result.sourceBlockIds_ = sourceBlockIds_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.content_ = content_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder + addPageHeadersBuilder(int index) { + return internalGetPageHeadersFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .getDefaultInstance()); } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) { - return mergeFrom((com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) other); - } else { - super.mergeFrom(other); - return this; - } + /** + * + * + *
+         * Page headers associated with the chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * + */ + public java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .Builder> + getPageHeadersBuilderList() { + return internalGetPageHeadersFieldBuilder().getBuilderList(); } - public Builder mergeFrom( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk other) { - if (other - == com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.getDefaultInstance()) - return this; - if (!other.getChunkId().isEmpty()) { - chunkId_ = other.chunkId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.sourceBlockIds_.isEmpty()) { - if (sourceBlockIds_.isEmpty()) { - sourceBlockIds_ = other.sourceBlockIds_; - bitField0_ |= 0x00000002; - } else { - ensureSourceBlockIdsIsMutable(); - sourceBlockIds_.addAll(other.sourceBlockIds_); - } - onChanged(); - } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasPageSpan()) { - mergePageSpan(other.getPageSpan()); - } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeaderOrBuilder> + internalGetPageHeadersFieldBuilder() { if (pageHeadersBuilder_ == null) { - if (!other.pageHeaders_.isEmpty()) { - if (pageHeaders_.isEmpty()) { - pageHeaders_ = other.pageHeaders_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensurePageHeadersIsMutable(); - pageHeaders_.addAll(other.pageHeaders_); - } - onChanged(); - } - } else { - if (!other.pageHeaders_.isEmpty()) { - if (pageHeadersBuilder_.isEmpty()) { - pageHeadersBuilder_.dispose(); - pageHeadersBuilder_ = null; - pageHeaders_ = other.pageHeaders_; - bitField0_ = (bitField0_ & ~0x00000010); - pageHeadersBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPageHeadersFieldBuilder() - : null; - } else { - pageHeadersBuilder_.addAllMessages(other.pageHeaders_); - } - } - } - if (pageFootersBuilder_ == null) { - if (!other.pageFooters_.isEmpty()) { - if (pageFooters_.isEmpty()) { - pageFooters_ = other.pageFooters_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensurePageFootersIsMutable(); - pageFooters_.addAll(other.pageFooters_); - } - onChanged(); - } - } else { - if (!other.pageFooters_.isEmpty()) { - if (pageFootersBuilder_.isEmpty()) { - pageFootersBuilder_.dispose(); - pageFootersBuilder_ = null; - pageFooters_ = other.pageFooters_; - bitField0_ = (bitField0_ & ~0x00000020); - pageFootersBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPageFootersFieldBuilder() - : null; - } else { - pageFootersBuilder_.addAllMessages(other.pageFooters_); - } - } + pageHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageHeaderOrBuilder>( + pageHeaders_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + pageHeaders_ = null; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + return pageHeadersBuilder_; } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter> + pageFooters_ = 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(); + private void ensurePageFootersIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + pageFooters_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter>( + pageFooters_); + bitField0_ |= 0x00000020; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - chunkId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureSourceBlockIdsIsMutable(); - sourceBlockIds_.add(s); - break; - } // case 18 - case 26: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetPageSpanFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - m = - input.readMessage( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeader.parser(), - extensionRegistry); - if (pageHeadersBuilder_ == null) { - ensurePageHeadersIsMutable(); - pageHeaders_.add(m); - } else { - pageHeadersBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: - { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - m = - input.readMessage( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooter.parser(), - extensionRegistry); - if (pageFootersBuilder_ == null) { - ensurePageFootersIsMutable(); - pageFooters_.add(m); - } else { - pageFootersBuilder_.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.lang.Object chunkId_ = ""; + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooterOrBuilder> + pageFootersBuilder_; /** * * *
-         * ID of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string chunk_id = 1; - * - * @return The chunkId. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public java.lang.String getChunkId() { - java.lang.Object ref = chunkId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - chunkId_ = s; - return s; + public java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter> + getPageFootersList() { + if (pageFootersBuilder_ == null) { + return java.util.Collections.unmodifiableList(pageFooters_); } else { - return (java.lang.String) ref; + return pageFootersBuilder_.getMessageList(); } } @@ -82783,22 +92020,18 @@ public java.lang.String getChunkId() { * * *
-         * ID of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string chunk_id = 1; - * - * @return The bytes for chunkId. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public com.google.protobuf.ByteString getChunkIdBytes() { - java.lang.Object ref = chunkId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - chunkId_ = b; - return b; + public int getPageFootersCount() { + if (pageFootersBuilder_ == null) { + return pageFooters_.size(); } else { - return (com.google.protobuf.ByteString) ref; + return pageFootersBuilder_.getCount(); } } @@ -82806,39 +92039,46 @@ public com.google.protobuf.ByteString getChunkIdBytes() { * * *
-         * ID of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string chunk_id = 1; - * - * @param value The chunkId to set. - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder setChunkId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + getPageFooters(int index) { + if (pageFootersBuilder_ == null) { + return pageFooters_.get(index); + } else { + return pageFootersBuilder_.getMessage(index); } - chunkId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** * * *
-         * ID of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string chunk_id = 1; - * - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder clearChunkId() { - chunkId_ = getDefaultInstance().getChunkId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public Builder setPageFooters( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter value) { + if (pageFootersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageFootersIsMutable(); + pageFooters_.set(index, value); + onChanged(); + } else { + pageFootersBuilder_.setMessage(index, value); + } return this; } @@ -82846,119 +92086,153 @@ public Builder clearChunkId() { * * *
-         * ID of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string chunk_id = 1; - * - * @param value The bytes for chunkId to set. - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder setChunkIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setPageFooters( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder + builderForValue) { + if (pageFootersBuilder_ == null) { + ensurePageFootersIsMutable(); + pageFooters_.set(index, builderForValue.build()); + onChanged(); + } else { + pageFootersBuilder_.setMessage(index, builderForValue.build()); } - checkByteStringIsUtf8(value); - chunkId_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } - private com.google.protobuf.LazyStringArrayList sourceBlockIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureSourceBlockIdsIsMutable() { - if (!sourceBlockIds_.isModifiable()) { - sourceBlockIds_ = new com.google.protobuf.LazyStringArrayList(sourceBlockIds_); - } - bitField0_ |= 0x00000002; - } - /** * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @return A list containing the sourceBlockIds. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public com.google.protobuf.ProtocolStringList getSourceBlockIdsList() { - sourceBlockIds_.makeImmutable(); - return sourceBlockIds_; + public Builder addPageFooters( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter value) { + if (pageFootersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageFootersIsMutable(); + pageFooters_.add(value); + onChanged(); + } else { + pageFootersBuilder_.addMessage(value); + } + return this; } /** * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @return The count of sourceBlockIds. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public int getSourceBlockIdsCount() { - return sourceBlockIds_.size(); + public Builder addPageFooters( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter value) { + if (pageFootersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageFootersIsMutable(); + pageFooters_.add(index, value); + onChanged(); + } else { + pageFootersBuilder_.addMessage(index, value); + } + return this; } /** * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @param index The index of the element to return. - * @return The sourceBlockIds at the given index. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public java.lang.String getSourceBlockIds(int index) { - return sourceBlockIds_.get(index); + public Builder addPageFooters( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder + builderForValue) { + if (pageFootersBuilder_ == null) { + ensurePageFootersIsMutable(); + pageFooters_.add(builderForValue.build()); + onChanged(); + } else { + pageFootersBuilder_.addMessage(builderForValue.build()); + } + return this; } /** * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @param index The index of the value to return. - * @return The bytes of the sourceBlockIds at the given index. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public com.google.protobuf.ByteString getSourceBlockIdsBytes(int index) { - return sourceBlockIds_.getByteString(index); + public Builder addPageFooters( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder + builderForValue) { + if (pageFootersBuilder_ == null) { + ensurePageFootersIsMutable(); + pageFooters_.add(index, builderForValue.build()); + onChanged(); + } else { + pageFootersBuilder_.addMessage(index, builderForValue.build()); + } + return this; } /** * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @param index The index to set the value at. - * @param value The sourceBlockIds to set. - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder setSourceBlockIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addAllPageFooters( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooter> + values) { + if (pageFootersBuilder_ == null) { + ensurePageFootersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageFooters_); + onChanged(); + } else { + pageFootersBuilder_.addAllMessages(values); } - ensureSourceBlockIdsIsMutable(); - sourceBlockIds_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); return this; } @@ -82966,22 +92240,21 @@ public Builder setSourceBlockIds(int index, java.lang.String value) { * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @param value The sourceBlockIds to add. - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder addSourceBlockIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearPageFooters() { + if (pageFootersBuilder_ == null) { + pageFooters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + pageFootersBuilder_.clear(); } - ensureSourceBlockIdsIsMutable(); - sourceBlockIds_.add(value); - bitField0_ |= 0x00000002; - onChanged(); return this; } @@ -82989,19 +92262,21 @@ public Builder addSourceBlockIds(java.lang.String value) { * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @param values The sourceBlockIds to add. - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder addAllSourceBlockIds(java.lang.Iterable values) { - ensureSourceBlockIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceBlockIds_); - bitField0_ |= 0x00000002; - onChanged(); + public Builder removePageFooters(int index) { + if (pageFootersBuilder_ == null) { + ensurePageFootersIsMutable(); + pageFooters_.remove(index); + onChanged(); + } else { + pageFootersBuilder_.remove(index); + } return this; } @@ -83009,67 +92284,59 @@ public Builder addAllSourceBlockIds(java.lang.Iterable values) * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder clearSourceBlockIds() { - sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; - onChanged(); - return this; + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder + getPageFootersBuilder(int index) { + return internalGetPageFootersFieldBuilder().getBuilder(index); } /** * * *
-         * Unused.
+         * Page footers associated with the chunk.
          * 
* - * repeated string source_block_ids = 2; - * - * @param value The bytes of the sourceBlockIds to add. - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder addSourceBlockIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooterOrBuilder + getPageFootersOrBuilder(int index) { + if (pageFootersBuilder_ == null) { + return pageFooters_.get(index); + } else { + return pageFootersBuilder_.getMessageOrBuilder(index); } - checkByteStringIsUtf8(value); - ensureSourceBlockIdsIsMutable(); - sourceBlockIds_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; } - private java.lang.Object content_ = ""; - /** * * *
-         * Text content of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string content = 3; - * - * @return The content. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 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; + public java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooterOrBuilder> + getPageFootersOrBuilderList() { + if (pageFootersBuilder_ != null) { + return pageFootersBuilder_.getMessageOrBuilderList(); } else { - return (java.lang.String) ref; + return java.util.Collections.unmodifiableList(pageFooters_); } } @@ -83077,136 +92344,160 @@ public java.lang.String getContent() { * * *
-         * Text content of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string content = 3; - * - * @return The bytes for content. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - 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 com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder + addPageFootersBuilder() { + return internalGetPageFootersFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .getDefaultInstance()); } /** * * *
-         * Text content of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string content = 3; - * - * @param value The content to set. - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder setContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder + addPageFootersBuilder(int index) { + return internalGetPageFootersFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .getDefaultInstance()); } /** * * *
-         * Text content of the chunk.
+         * Page footers associated with the chunk.
          * 
* - * string content = 3; - * - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; + * */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + public java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .Builder> + getPageFootersBuilderList() { + return internalGetPageFootersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooterOrBuilder> + internalGetPageFootersFieldBuilder() { + if (pageFootersBuilder_ == null) { + pageFootersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkPageFooterOrBuilder>( + pageFooters_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + pageFooters_ = null; + } + return pageFootersBuilder_; } + private java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField> + chunkFields_ = java.util.Collections.emptyList(); + + private void ensureChunkFieldsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + chunkFields_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField>( + chunkFields_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkFieldOrBuilder> + chunkFieldsBuilder_; + /** * * *
-         * Text content of the chunk.
+         * Chunk fields inside this chunk.
          * 
* - * string content = 3; - * - * @param value The bytes for content to set. - * @return This builder for chaining. + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField> + getChunkFieldsList() { + if (chunkFieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(chunkFields_); + } else { + return chunkFieldsBuilder_.getMessageList(); } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; } - private com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - pageSpan_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder> - pageSpanBuilder_; - /** * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * - * - * @return Whether the pageSpan field is set. */ - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000008) != 0); + public int getChunkFieldsCount() { + if (chunkFieldsBuilder_ == null) { + return chunkFields_.size(); + } else { + return chunkFieldsBuilder_.getCount(); + } } /** * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * - * - * @return The pageSpan. */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - getPageSpan() { - if (pageSpanBuilder_ == null) { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + getChunkFields(int index) { + if (chunkFieldsBuilder_ == null) { + return chunkFields_.get(index); } else { - return pageSpanBuilder_.getMessage(); + return chunkFieldsBuilder_.getMessage(index); } } @@ -83214,25 +92505,26 @@ public boolean hasPageSpan() { * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public Builder setPageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { - if (pageSpanBuilder_ == null) { + public Builder setChunkFields( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField value) { + if (chunkFieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - pageSpan_ = value; + ensureChunkFieldsIsMutable(); + chunkFields_.set(index, value); + onChanged(); } else { - pageSpanBuilder_.setMessage(value); + chunkFieldsBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000008; - onChanged(); return this; } @@ -83240,23 +92532,24 @@ public Builder setPageSpan( * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public Builder setPageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder + public Builder setChunkFields( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder builderForValue) { - if (pageSpanBuilder_ == null) { - pageSpan_ = builderForValue.build(); + if (chunkFieldsBuilder_ == null) { + ensureChunkFieldsIsMutable(); + chunkFields_.set(index, builderForValue.build()); + onChanged(); } else { - pageSpanBuilder_.setMessage(builderForValue.build()); + chunkFieldsBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000008; - onChanged(); return this; } @@ -83264,31 +92557,24 @@ public Builder setPageSpan( * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public Builder mergePageSpan( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan value) { - if (pageSpanBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && pageSpan_ != null - && pageSpan_ - != com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance()) { - getPageSpanBuilder().mergeFrom(value); - } else { - pageSpan_ = value; + public Builder addChunkFields( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField value) { + if (chunkFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - } else { - pageSpanBuilder_.mergeFrom(value); - } - if (pageSpan_ != null) { - bitField0_ |= 0x00000008; + ensureChunkFieldsIsMutable(); + chunkFields_.add(value); onChanged(); + } else { + chunkFieldsBuilder_.addMessage(value); } return this; } @@ -83297,21 +92583,50 @@ public Builder mergePageSpan( * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public Builder clearPageSpan() { - bitField0_ = (bitField0_ & ~0x00000008); - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; + public Builder addChunkFields( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField value) { + if (chunkFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkFieldsIsMutable(); + chunkFields_.add(index, value); + onChanged(); + } else { + chunkFieldsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+         * Chunk fields inside this chunk.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; + * + */ + public Builder addChunkFields( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder + builderForValue) { + if (chunkFieldsBuilder_ == null) { + ensureChunkFieldsIsMutable(); + chunkFields_.add(builderForValue.build()); + onChanged(); + } else { + chunkFieldsBuilder_.addMessage(builderForValue.build()); } - onChanged(); return this; } @@ -83319,152 +92634,130 @@ public Builder clearPageSpan() { * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder - getPageSpanBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return internalGetPageSpanFieldBuilder().getBuilder(); + public Builder addChunkFields( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder + builderForValue) { + if (chunkFieldsBuilder_ == null) { + ensureChunkFieldsIsMutable(); + chunkFields_.add(index, builderForValue.build()); + onChanged(); + } else { + chunkFieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; } /** * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder - getPageSpanOrBuilder() { - if (pageSpanBuilder_ != null) { - return pageSpanBuilder_.getMessageOrBuilder(); + public Builder addAllChunkFields( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField> + values) { + if (chunkFieldsBuilder_ == null) { + ensureChunkFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunkFields_); + onChanged(); } else { - return pageSpan_ == null - ? com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .getDefaultInstance() - : pageSpan_; + chunkFieldsBuilder_.addAllMessages(values); } + return this; } /** * * *
-         * Page span of the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder> - internalGetPageSpanFieldBuilder() { - if (pageSpanBuilder_ == null) { - pageSpanBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageSpanOrBuilder>(getPageSpan(), getParentForChildren(), isClean()); - pageSpan_ = null; - } - return pageSpanBuilder_; - } - - private java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader> - pageHeaders_ = java.util.Collections.emptyList(); - - private void ensurePageHeadersIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - pageHeaders_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader>( - pageHeaders_); - bitField0_ |= 0x00000010; + public Builder clearChunkFields() { + if (chunkFieldsBuilder_ == null) { + chunkFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + chunkFieldsBuilder_.clear(); } + return this; } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeaderOrBuilder> - pageHeadersBuilder_; - /** * * *
-         * Page headers associated with the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader> - getPageHeadersList() { - if (pageHeadersBuilder_ == null) { - return java.util.Collections.unmodifiableList(pageHeaders_); + public Builder removeChunkFields(int index) { + if (chunkFieldsBuilder_ == null) { + ensureChunkFieldsIsMutable(); + chunkFields_.remove(index); + onChanged(); } else { - return pageHeadersBuilder_.getMessageList(); + chunkFieldsBuilder_.remove(index); } + return this; } /** * * *
-         * Page headers associated with the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public int getPageHeadersCount() { - if (pageHeadersBuilder_ == null) { - return pageHeaders_.size(); - } else { - return pageHeadersBuilder_.getCount(); - } + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder + getChunkFieldsBuilder(int index) { + return internalGetChunkFieldsFieldBuilder().getBuilder(index); } /** * * *
-         * Page headers associated with the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - getPageHeaders(int index) { - if (pageHeadersBuilder_ == null) { - return pageHeaders_.get(index); + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkFieldOrBuilder + getChunkFieldsOrBuilder(int index) { + if (chunkFieldsBuilder_ == null) { + return chunkFields_.get(index); } else { - return pageHeadersBuilder_.getMessage(index); + return chunkFieldsBuilder_.getMessageOrBuilder(index); } } @@ -83472,948 +92765,1307 @@ public int getPageHeadersCount() { * * *
-         * Page headers associated with the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public Builder setPageHeaders( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader value) { - if (pageHeadersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePageHeadersIsMutable(); - pageHeaders_.set(index, value); - onChanged(); + public java.util.List< + ? extends + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkFieldOrBuilder> + getChunkFieldsOrBuilderList() { + if (chunkFieldsBuilder_ != null) { + return chunkFieldsBuilder_.getMessageOrBuilderList(); } else { - pageHeadersBuilder_.setMessage(index, value); + return java.util.Collections.unmodifiableList(chunkFields_); } - return this; } /** * * *
-         * Page headers associated with the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public Builder setPageHeaders( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder - builderForValue) { - if (pageHeadersBuilder_ == null) { - ensurePageHeadersIsMutable(); - pageHeaders_.set(index, builderForValue.build()); - onChanged(); - } else { - pageHeadersBuilder_.setMessage(index, builderForValue.build()); - } - return this; + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder + addChunkFieldsBuilder() { + return internalGetChunkFieldsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + .getDefaultInstance()); } /** * * *
-         * Page headers associated with the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public Builder addPageHeaders( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader value) { - if (pageHeadersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePageHeadersIsMutable(); - pageHeaders_.add(value); - onChanged(); - } else { - pageHeadersBuilder_.addMessage(value); - } - return this; + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder + addChunkFieldsBuilder(int index) { + return internalGetChunkFieldsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + .getDefaultInstance()); } /** * * *
-         * Page headers associated with the chunk.
+         * Chunk fields inside this chunk.
          * 
* * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField chunk_fields = 7; * */ - public Builder addPageHeaders( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader value) { - if (pageHeadersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePageHeadersIsMutable(); - pageHeaders_.add(index, value); - onChanged(); - } else { - pageHeadersBuilder_.addMessage(index, value); + public java.util.List< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder> + getChunkFieldsBuilderList() { + return internalGetChunkFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkFieldOrBuilder> + internalGetChunkFieldsFieldBuilder() { + if (chunkFieldsBuilder_ == null) { + chunkFieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + .Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + .ChunkFieldOrBuilder>( + chunkFields_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + chunkFields_ = null; } - return this; + return chunkFieldsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) + private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk(); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Chunk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.documentai.v1.Document.ChunkedDocument.Chunk + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CHUNKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List chunks_; + + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + @java.lang.Override + public java.util.List + getChunksList() { + return chunks_; + } + + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder> + getChunksOrBuilderList() { + return chunks_; + } + + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + @java.lang.Override + public int getChunksCount() { + return chunks_.size(); + } + + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk getChunks(int index) { + return chunks_.get(index); + } + + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder + getChunksOrBuilder(int index) { + return chunks_.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 < chunks_.size(); i++) { + output.writeMessage(1, chunks_.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 < chunks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, chunks_.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.documentai.v1.Document.ChunkedDocument)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1.Document.ChunkedDocument other = + (com.google.cloud.documentai.v1.Document.ChunkedDocument) obj; + + if (!getChunksList().equals(other.getChunksList())) 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 (getChunksCount() > 0) { + hash = (37 * hash) + CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getChunksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument 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.documentai.v1.Document.ChunkedDocument parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument 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.documentai.v1.Document.ChunkedDocument parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument 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.documentai.v1.Document.ChunkedDocument parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument 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.documentai.v1.Document.ChunkedDocument parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument 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.documentai.v1.Document.ChunkedDocument 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 chunks that the document is divided into.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument) + com.google.cloud.documentai.v1.Document.ChunkedDocumentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.ChunkedDocument.class, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1.Document.ChunkedDocument.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (chunksBuilder_ == null) { + chunks_ = java.util.Collections.emptyList(); + } else { + chunks_ = null; + chunksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public Builder addPageHeaders( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder - builderForValue) { - if (pageHeadersBuilder_ == null) { - ensurePageHeadersIsMutable(); - pageHeaders_.add(builderForValue.build()); - onChanged(); - } else { - pageHeadersBuilder_.addMessage(builderForValue.build()); - } - return this; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.ChunkedDocument.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument build() { + com.google.cloud.documentai.v1.Document.ChunkedDocument result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public Builder addPageHeaders( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder - builderForValue) { - if (pageHeadersBuilder_ == null) { - ensurePageHeadersIsMutable(); - pageHeaders_.add(index, builderForValue.build()); - onChanged(); - } else { - pageHeadersBuilder_.addMessage(index, builderForValue.build()); - } - return this; + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument buildPartial() { + com.google.cloud.documentai.v1.Document.ChunkedDocument result = + new com.google.cloud.documentai.v1.Document.ChunkedDocument(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public Builder addAllPageHeaders( - java.lang.Iterable< - ? extends - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeader> - values) { - if (pageHeadersBuilder_ == null) { - ensurePageHeadersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageHeaders_); - onChanged(); - } else { - pageHeadersBuilder_.addAllMessages(values); + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1.Document.ChunkedDocument result) { + if (chunksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + chunks_ = java.util.Collections.unmodifiableList(chunks_); + bitField0_ = (bitField0_ & ~0x00000001); } - return this; + result.chunks_ = chunks_; + } else { + result.chunks_ = chunksBuilder_.build(); } + } - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public Builder clearPageHeaders() { - if (pageHeadersBuilder_ == null) { - pageHeaders_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - pageHeadersBuilder_.clear(); - } + private void buildPartial0(com.google.cloud.documentai.v1.Document.ChunkedDocument result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1.Document.ChunkedDocument) { + return mergeFrom((com.google.cloud.documentai.v1.Document.ChunkedDocument) other); + } else { + super.mergeFrom(other); return this; } + } - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public Builder removePageHeaders(int index) { - if (pageHeadersBuilder_ == null) { - ensurePageHeadersIsMutable(); - pageHeaders_.remove(index); + public Builder mergeFrom(com.google.cloud.documentai.v1.Document.ChunkedDocument other) { + if (other == com.google.cloud.documentai.v1.Document.ChunkedDocument.getDefaultInstance()) + return this; + if (chunksBuilder_ == null) { + if (!other.chunks_.isEmpty()) { + if (chunks_.isEmpty()) { + chunks_ = other.chunks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChunksIsMutable(); + chunks_.addAll(other.chunks_); + } onChanged(); - } else { - pageHeadersBuilder_.remove(index); } - return this; - } - - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder - getPageHeadersBuilder(int index) { - return internalGetPageHeadersFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeaderOrBuilder - getPageHeadersOrBuilder(int index) { - if (pageHeadersBuilder_ == null) { - return pageHeaders_.get(index); - } else { - return pageHeadersBuilder_.getMessageOrBuilder(index); + } else { + if (!other.chunks_.isEmpty()) { + if (chunksBuilder_.isEmpty()) { + chunksBuilder_.dispose(); + chunksBuilder_ = null; + chunks_ = other.chunks_; + bitField0_ = (bitField0_ & ~0x00000001); + chunksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChunksFieldBuilder() + : null; + } else { + chunksBuilder_.addAllMessages(other.chunks_); + } } } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeaderOrBuilder> - getPageHeadersOrBuilderList() { - if (pageHeadersBuilder_ != null) { - return pageHeadersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pageHeaders_); - } - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder - addPageHeadersBuilder() { - return internalGetPageHeadersFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .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: + { + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk m = + input.readMessage( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.parser(), + extensionRegistry); + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(m); + } else { + chunksBuilder_.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; + } - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader.Builder - addPageHeadersBuilder(int index) { - return internalGetPageHeadersFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .getDefaultInstance()); - } + private int bitField0_; - /** - * - * - *
-         * Page headers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader page_headers = 5; - * - */ - public java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .Builder> - getPageHeadersBuilderList() { - return internalGetPageHeadersFieldBuilder().getBuilderList(); - } + private java.util.List + chunks_ = java.util.Collections.emptyList(); - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeaderOrBuilder> - internalGetPageHeadersFieldBuilder() { - if (pageHeadersBuilder_ == null) { - pageHeadersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageHeaderOrBuilder>( - pageHeaders_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - pageHeaders_ = null; - } - return pageHeadersBuilder_; + private void ensureChunksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + chunks_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk>(chunks_); + bitField0_ |= 0x00000001; } + } - private java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter> - pageFooters_ = java.util.Collections.emptyList(); + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder> + chunksBuilder_; - private void ensurePageFootersIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - pageFooters_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter>( - pageFooters_); - bitField0_ |= 0x00000020; - } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public java.util.List + getChunksList() { + if (chunksBuilder_ == null) { + return java.util.Collections.unmodifiableList(chunks_); + } else { + return chunksBuilder_.getMessageList(); } + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooterOrBuilder> - pageFootersBuilder_; + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public int getChunksCount() { + if (chunksBuilder_ == null) { + return chunks_.size(); + } else { + return chunksBuilder_.getCount(); + } + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter> - getPageFootersList() { - if (pageFootersBuilder_ == null) { - return java.util.Collections.unmodifiableList(pageFooters_); - } else { - return pageFootersBuilder_.getMessageList(); - } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk getChunks(int index) { + if (chunksBuilder_ == null) { + return chunks_.get(index); + } else { + return chunksBuilder_.getMessage(index); } + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public int getPageFootersCount() { - if (pageFootersBuilder_ == null) { - return pageFooters_.size(); - } else { - return pageFootersBuilder_.getCount(); + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder setChunks( + int index, com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureChunksIsMutable(); + chunks_.set(index, value); + onChanged(); + } else { + chunksBuilder_.setMessage(index, value); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - getPageFooters(int index) { - if (pageFootersBuilder_ == null) { - return pageFooters_.get(index); - } else { - return pageFootersBuilder_.getMessage(index); - } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder setChunks( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.set(index, builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.setMessage(index, builderForValue.build()); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder setPageFooters( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter value) { - if (pageFootersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePageFootersIsMutable(); - pageFooters_.set(index, value); - onChanged(); - } else { - pageFootersBuilder_.setMessage(index, value); + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addChunks( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - return this; + ensureChunksIsMutable(); + chunks_.add(value); + onChanged(); + } else { + chunksBuilder_.addMessage(value); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder setPageFooters( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder - builderForValue) { - if (pageFootersBuilder_ == null) { - ensurePageFootersIsMutable(); - pageFooters_.set(index, builderForValue.build()); - onChanged(); - } else { - pageFootersBuilder_.setMessage(index, builderForValue.build()); + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addChunks( + int index, com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - return this; + ensureChunksIsMutable(); + chunks_.add(index, value); + onChanged(); + } else { + chunksBuilder_.addMessage(index, value); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder addPageFooters( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter value) { - if (pageFootersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePageFootersIsMutable(); - pageFooters_.add(value); - onChanged(); - } else { - pageFootersBuilder_.addMessage(value); - } - return this; + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addChunks( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.addMessage(builderForValue.build()); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder addPageFooters( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter value) { - if (pageFootersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePageFootersIsMutable(); - pageFooters_.add(index, value); - onChanged(); - } else { - pageFootersBuilder_.addMessage(index, value); - } - return this; + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addChunks( + int index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(index, builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.addMessage(index, builderForValue.build()); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder addPageFooters( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder - builderForValue) { - if (pageFootersBuilder_ == null) { - ensurePageFootersIsMutable(); - pageFooters_.add(builderForValue.build()); - onChanged(); - } else { - pageFootersBuilder_.addMessage(builderForValue.build()); - } - return this; + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addAllChunks( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk> + values) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunks_); + onChanged(); + } else { + chunksBuilder_.addAllMessages(values); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder addPageFooters( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder - builderForValue) { - if (pageFootersBuilder_ == null) { - ensurePageFootersIsMutable(); - pageFooters_.add(index, builderForValue.build()); - onChanged(); - } else { - pageFootersBuilder_.addMessage(index, builderForValue.build()); - } - return this; + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder clearChunks() { + if (chunksBuilder_ == null) { + chunks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + chunksBuilder_.clear(); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder addAllPageFooters( - java.lang.Iterable< - ? extends - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooter> - values) { - if (pageFootersBuilder_ == null) { - ensurePageFootersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageFooters_); - onChanged(); - } else { - pageFootersBuilder_.addAllMessages(values); - } - return this; + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder removeChunks(int index) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.remove(index); + onChanged(); + } else { + chunksBuilder_.remove(index); } + return this; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder clearPageFooters() { - if (pageFootersBuilder_ == null) { - pageFooters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - pageFootersBuilder_.clear(); - } - return this; + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder getChunksBuilder( + int index) { + return internalGetChunksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder + getChunksOrBuilder(int index) { + if (chunksBuilder_ == null) { + return chunks_.get(index); + } else { + return chunksBuilder_.getMessageOrBuilder(index); } + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public Builder removePageFooters(int index) { - if (pageFootersBuilder_ == null) { - ensurePageFootersIsMutable(); - pageFooters_.remove(index); - onChanged(); - } else { - pageFootersBuilder_.remove(index); - } - return this; + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder> + getChunksOrBuilderList() { + if (chunksBuilder_ != null) { + return chunksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(chunks_); + } + } + + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder + addChunksBuilder() { + return internalGetChunksFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.getDefaultInstance()); + } + + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder addChunksBuilder( + int index) { + return internalGetChunksFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.getDefaultInstance()); + } + + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public java.util.List + getChunksBuilderList() { + return internalGetChunksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder> + internalGetChunksFieldBuilder() { + if (chunksBuilder_ == null) { + chunksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk, + com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder, + com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder>( + chunks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + chunks_ = null; } + return chunksBuilder_; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder - getPageFootersBuilder(int index) { - return internalGetPageFootersFieldBuilder().getBuilder(index); - } + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument) + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooterOrBuilder - getPageFootersOrBuilder(int index) { - if (pageFootersBuilder_ == null) { - return pageFooters_.get(index); - } else { - return pageFootersBuilder_.getMessageOrBuilder(index); - } - } + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument) + private static final com.google.cloud.documentai.v1.Document.ChunkedDocument DEFAULT_INSTANCE; - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public java.util.List< - ? extends - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooterOrBuilder> - getPageFootersOrBuilderList() { - if (pageFootersBuilder_ != null) { - return pageFootersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pageFooters_); + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.Document.ChunkedDocument(); + } + + public static com.google.cloud.documentai.v1.Document.ChunkedDocument getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkedDocument parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - } + }; - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder - addPageFootersBuilder() { - return internalGetPageFootersFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .getDefaultInstance()); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.Builder - addPageFootersBuilder(int index) { - return internalGetPageFootersFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .getDefaultInstance()); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * - * - *
-         * Page footers associated with the chunk.
-         * 
- * - * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter page_footers = 6; - * - */ - public java.util.List< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .Builder> - getPageFootersBuilderList() { - return internalGetPageFootersFieldBuilder().getBuilderList(); - } + @java.lang.Override + public com.google.cloud.documentai.v1.Document.ChunkedDocument getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooterOrBuilder> - internalGetPageFootersFieldBuilder() { - if (pageFootersBuilder_ == null) { - pageFootersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter - .Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - .ChunkPageFooterOrBuilder>( - pageFooters_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - pageFooters_ = null; - } - return pageFootersBuilder_; - } + public interface BlobAssetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1.Document.BlobAsset) + com.google.protobuf.MessageOrBuilder { - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) - } + /** + * + * + *
+     * Optional. The id of the blob asset.
+     * 
+ * + * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The assetId. + */ + java.lang.String getAssetId(); - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument.Chunk) - private static final com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - DEFAULT_INSTANCE; + /** + * + * + *
+     * Optional. The id of the blob asset.
+     * 
+ * + * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for assetId. + */ + com.google.protobuf.ByteString getAssetIdBytes(); - static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk(); - } + /** + * + * + *
+     * Optional. The content of the blob asset, for example, image bytes.
+     * 
+ * + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + com.google.protobuf.ByteString getContent(); - public static com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
+     * The mime type of the blob asset.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
+     * 
+ * + * string mime_type = 3; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Chunk parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + /** + * + * + *
+     * The mime type of the blob asset.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
+     * 
+ * + * string mime_type = 3; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
+   * Represents a blob asset. It's used to store the content of the inline blob
+   * in this document, for example, image bytes, such that it can be referenced
+   * by other fields in the document via asset ID.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1.Document.BlobAsset} + */ + public static final class BlobAsset extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.Document.BlobAsset) + BlobAssetOrBuilder { + private static final long serialVersionUID = 0L; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BlobAsset"); + } - @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + // Use BlobAsset.newBuilder() to construct. + private BlobAsset(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - public static final int CHUNKS_FIELD_NUMBER = 1; + private BlobAsset() { + assetId_ = ""; + content_ = com.google.protobuf.ByteString.EMPTY; + mimeType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_BlobAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1.DocumentProto + .internal_static_google_cloud_documentai_v1_Document_BlobAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1.Document.BlobAsset.class, + com.google.cloud.documentai.v1.Document.BlobAsset.Builder.class); + } + + public static final int ASSET_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private java.util.List chunks_; + private volatile java.lang.Object assetId_ = ""; /** * * *
-     * List of chunks.
+     * Optional. The id of the blob asset.
      * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The assetId. */ @java.lang.Override - public java.util.List - getChunksList() { - return chunks_; + public java.lang.String getAssetId() { + java.lang.Object ref = assetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetId_ = s; + return s; + } } /** * * *
-     * List of chunks.
+     * Optional. The id of the blob asset.
      * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for assetId. */ @java.lang.Override - public java.util.List< - ? extends com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder> - getChunksOrBuilderList() { - return chunks_; + public com.google.protobuf.ByteString getAssetIdBytes() { + java.lang.Object ref = assetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + public static final int CONTENT_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** * * *
-     * List of chunks.
+     * Optional. The content of the blob asset, for example, image bytes.
      * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. */ @java.lang.Override - public int getChunksCount() { - return chunks_.size(); + public com.google.protobuf.ByteString getContent() { + return content_; } + public static final int MIME_TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + /** * * *
-     * List of chunks.
+     * The mime type of the blob asset.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
      * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * string mime_type = 3; + * + * @return The mimeType. */ @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk getChunks(int index) { - return chunks_.get(index); + 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; + } } /** * * *
-     * List of chunks.
+     * The mime type of the blob asset.
+     * An IANA published [media type (MIME
+     * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
      * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; + * string mime_type = 3; + * + * @return The bytes for mimeType. */ @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder - getChunksOrBuilder(int index) { - return chunks_.get(index); + 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; @@ -84430,8 +94082,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 < chunks_.size(); i++) { - output.writeMessage(1, chunks_.get(i)); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(assetId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, assetId_); + } + if (!content_.isEmpty()) { + output.writeBytes(2, content_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, mimeType_); } getUnknownFields().writeTo(output); } @@ -84442,8 +94100,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < chunks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, chunks_.get(i)); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(assetId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, assetId_); + } + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, content_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, mimeType_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -84455,13 +94119,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.documentai.v1.Document.ChunkedDocument)) { + if (!(obj instanceof com.google.cloud.documentai.v1.Document.BlobAsset)) { return super.equals(obj); } - com.google.cloud.documentai.v1.Document.ChunkedDocument other = - (com.google.cloud.documentai.v1.Document.ChunkedDocument) obj; + com.google.cloud.documentai.v1.Document.BlobAsset other = + (com.google.cloud.documentai.v1.Document.BlobAsset) obj; - if (!getChunksList().equals(other.getChunksList())) return false; + if (!getAssetId().equals(other.getAssetId())) return false; + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -84473,80 +94139,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getChunksCount() > 0) { - hash = (37 * hash) + CHUNKS_FIELD_NUMBER; - hash = (53 * hash) + getChunksList().hashCode(); - } + hash = (37 * hash) + ASSET_ID_FIELD_NUMBER; + hash = (53 * hash) + getAssetId().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + 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.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset 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.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset 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.documentai.v1.Document.ChunkedDocument parseFrom(byte[] data) + public static com.google.cloud.documentai.v1.Document.BlobAsset parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset 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.documentai.v1.Document.ChunkedDocument parseDelimitedFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseDelimitedFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset 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.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument parseFrom( + public static com.google.cloud.documentai.v1.Document.BlobAsset parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -84563,8 +94231,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.documentai.v1.Document.ChunkedDocument prototype) { + public static Builder newBuilder(com.google.cloud.documentai.v1.Document.BlobAsset prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -84583,31 +94250,33 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
-     * Represents the chunks that the document is divided into.
+     * Represents a blob asset. It's used to store the content of the inline blob
+     * in this document, for example, image bytes, such that it can be referenced
+     * by other fields in the document via asset ID.
      * 
* - * Protobuf type {@code google.cloud.documentai.v1.Document.ChunkedDocument} + * Protobuf type {@code google.cloud.documentai.v1.Document.BlobAsset} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.ChunkedDocument) - com.google.cloud.documentai.v1.Document.ChunkedDocumentOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.Document.BlobAsset) + com.google.cloud.documentai.v1.Document.BlobAssetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor; + .internal_static_google_cloud_documentai_v1_Document_BlobAsset_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_fieldAccessorTable + .internal_static_google_cloud_documentai_v1_Document_BlobAsset_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.documentai.v1.Document.ChunkedDocument.class, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Builder.class); + com.google.cloud.documentai.v1.Document.BlobAsset.class, + com.google.cloud.documentai.v1.Document.BlobAsset.Builder.class); } - // Construct using com.google.cloud.documentai.v1.Document.ChunkedDocument.newBuilder() + // Construct using com.google.cloud.documentai.v1.Document.BlobAsset.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -84618,30 +94287,26 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - if (chunksBuilder_ == null) { - chunks_ = java.util.Collections.emptyList(); - } else { - chunks_ = null; - chunksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); + assetId_ = ""; + content_ = com.google.protobuf.ByteString.EMPTY; + mimeType_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.documentai.v1.DocumentProto - .internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor; + .internal_static_google_cloud_documentai_v1_Document_BlobAsset_descriptor; } @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument getDefaultInstanceForType() { - return com.google.cloud.documentai.v1.Document.ChunkedDocument.getDefaultInstance(); + public com.google.cloud.documentai.v1.Document.BlobAsset getDefaultInstanceForType() { + return com.google.cloud.documentai.v1.Document.BlobAsset.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument build() { - com.google.cloud.documentai.v1.Document.ChunkedDocument result = buildPartial(); + public com.google.cloud.documentai.v1.Document.BlobAsset build() { + com.google.cloud.documentai.v1.Document.BlobAsset result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -84649,10 +94314,9 @@ public com.google.cloud.documentai.v1.Document.ChunkedDocument build() { } @java.lang.Override - public com.google.cloud.documentai.v1.Document.ChunkedDocument buildPartial() { - com.google.cloud.documentai.v1.Document.ChunkedDocument result = - new com.google.cloud.documentai.v1.Document.ChunkedDocument(this); - buildPartialRepeatedFields(result); + public com.google.cloud.documentai.v1.Document.BlobAsset buildPartial() { + com.google.cloud.documentai.v1.Document.BlobAsset result = + new com.google.cloud.documentai.v1.Document.BlobAsset(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -84660,62 +94324,44 @@ public com.google.cloud.documentai.v1.Document.ChunkedDocument buildPartial() { return result; } - private void buildPartialRepeatedFields( - com.google.cloud.documentai.v1.Document.ChunkedDocument result) { - if (chunksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - chunks_ = java.util.Collections.unmodifiableList(chunks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.chunks_ = chunks_; - } else { - result.chunks_ = chunksBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.documentai.v1.Document.ChunkedDocument result) { + private void buildPartial0(com.google.cloud.documentai.v1.Document.BlobAsset result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.assetId_ = assetId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.mimeType_ = mimeType_; + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.documentai.v1.Document.ChunkedDocument) { - return mergeFrom((com.google.cloud.documentai.v1.Document.ChunkedDocument) other); + if (other instanceof com.google.cloud.documentai.v1.Document.BlobAsset) { + return mergeFrom((com.google.cloud.documentai.v1.Document.BlobAsset) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.documentai.v1.Document.ChunkedDocument other) { - if (other == com.google.cloud.documentai.v1.Document.ChunkedDocument.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.documentai.v1.Document.BlobAsset other) { + if (other == com.google.cloud.documentai.v1.Document.BlobAsset.getDefaultInstance()) return this; - if (chunksBuilder_ == null) { - if (!other.chunks_.isEmpty()) { - if (chunks_.isEmpty()) { - chunks_ = other.chunks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureChunksIsMutable(); - chunks_.addAll(other.chunks_); - } - onChanged(); - } - } else { - if (!other.chunks_.isEmpty()) { - if (chunksBuilder_.isEmpty()) { - chunksBuilder_.dispose(); - chunksBuilder_ = null; - chunks_ = other.chunks_; - bitField0_ = (bitField0_ & ~0x00000001); - chunksBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetChunksFieldBuilder() - : null; - } else { - chunksBuilder_.addAllMessages(other.chunks_); - } - } + if (!other.getAssetId().isEmpty()) { + assetId_ = other.assetId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + setContent(other.getContent()); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000004; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -84745,18 +94391,22 @@ public Builder mergeFrom( break; case 10: { - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk m = - input.readMessage( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.parser(), - extensionRegistry); - if (chunksBuilder_ == null) { - ensureChunksIsMutable(); - chunks_.add(m); - } else { - chunksBuilder_.addMessage(m); - } + assetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + content_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -84776,58 +94426,28 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List - chunks_ = java.util.Collections.emptyList(); - - private void ensureChunksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - chunks_ = - new java.util.ArrayList< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk>(chunks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder> - chunksBuilder_; + private java.lang.Object assetId_ = ""; /** * * *
-       * List of chunks.
+       * Optional. The id of the blob asset.
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * - */ - public java.util.List - getChunksList() { - if (chunksBuilder_ == null) { - return java.util.Collections.unmodifiableList(chunks_); - } else { - return chunksBuilder_.getMessageList(); - } - } - - /** - * + * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; * - *
-       * List of chunks.
-       * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * @return The assetId. */ - public int getChunksCount() { - if (chunksBuilder_ == null) { - return chunks_.size(); + public java.lang.String getAssetId() { + java.lang.Object ref = assetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetId_ = s; + return s; } else { - return chunksBuilder_.getCount(); + return (java.lang.String) ref; } } @@ -84835,90 +94455,44 @@ public int getChunksCount() { * * *
-       * List of chunks.
+       * Optional. The id of the blob asset.
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk getChunks(int index) { - if (chunksBuilder_ == null) { - return chunks_.get(index); - } else { - return chunksBuilder_.getMessage(index); - } - } - - /** - * + * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; * - *
-       * List of chunks.
-       * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * @return The bytes for assetId. */ - public Builder setChunks( - int index, com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk value) { - if (chunksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChunksIsMutable(); - chunks_.set(index, value); - onChanged(); + public com.google.protobuf.ByteString getAssetIdBytes() { + java.lang.Object ref = assetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetId_ = b; + return b; } else { - chunksBuilder_.setMessage(index, value); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-       * List of chunks.
+       * Optional. The id of the blob asset.
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * - */ - public Builder setChunks( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder builderForValue) { - if (chunksBuilder_ == null) { - ensureChunksIsMutable(); - chunks_.set(index, builderForValue.build()); - onChanged(); - } else { - chunksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * List of chunks.
-       * 
+ * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * @param value The assetId to set. + * @return This builder for chaining. */ - public Builder addChunks( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk value) { - if (chunksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChunksIsMutable(); - chunks_.add(value); - onChanged(); - } else { - chunksBuilder_.addMessage(value); + public Builder setAssetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + assetId_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -84926,24 +94500,17 @@ public Builder addChunks( * * *
-       * List of chunks.
+       * Optional. The id of the blob asset.
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder addChunks( - int index, com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk value) { - if (chunksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChunksIsMutable(); - chunks_.add(index, value); - onChanged(); - } else { - chunksBuilder_.addMessage(index, value); - } + public Builder clearAssetId() { + assetId_ = getDefaultInstance().getAssetId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); return this; } @@ -84951,68 +94518,62 @@ public Builder addChunks( * * *
-       * List of chunks.
+       * Optional. The id of the blob asset.
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for assetId to set. + * @return This builder for chaining. */ - public Builder addChunks( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder builderForValue) { - if (chunksBuilder_ == null) { - ensureChunksIsMutable(); - chunks_.add(builderForValue.build()); - onChanged(); - } else { - chunksBuilder_.addMessage(builderForValue.build()); + public Builder setAssetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + assetId_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** * * *
-       * List of chunks.
+       * Optional. The content of the blob asset, for example, image bytes.
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. */ - public Builder addChunks( - int index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder builderForValue) { - if (chunksBuilder_ == null) { - ensureChunksIsMutable(); - chunks_.add(index, builderForValue.build()); - onChanged(); - } else { - chunksBuilder_.addMessage(index, builderForValue.build()); - } - return this; + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; } /** * * *
-       * List of chunks.
+       * Optional. The content of the blob asset, for example, image bytes.
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The content to set. + * @return This builder for chaining. */ - public Builder addAllChunks( - java.lang.Iterable< - ? extends com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk> - values) { - if (chunksBuilder_ == null) { - ensureChunksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunks_); - onChanged(); - } else { - chunksBuilder_.addAllMessages(values); + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -85020,75 +94581,69 @@ public Builder addAllChunks( * * *
-       * List of chunks.
+       * Optional. The content of the blob asset, for example, image bytes.
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * bytes content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder clearChunks() { - if (chunksBuilder_ == null) { - chunks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - chunksBuilder_.clear(); - } + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000002); + content_ = getDefaultInstance().getContent(); + onChanged(); return this; } + private java.lang.Object mimeType_ = ""; + /** * * *
-       * List of chunks.
+       * The mime type of the blob asset.
+       * An IANA published [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * string mime_type = 3; + * + * @return The mimeType. */ - public Builder removeChunks(int index) { - if (chunksBuilder_ == null) { - ensureChunksIsMutable(); - chunks_.remove(index); - onChanged(); + 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 { - chunksBuilder_.remove(index); + return (java.lang.String) ref; } - return this; } /** * * *
-       * List of chunks.
+       * The mime type of the blob asset.
+       * An IANA published [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder getChunksBuilder( - int index) { - return internalGetChunksFieldBuilder().getBuilder(index); - } - - /** - * + * string mime_type = 3; * - *
-       * List of chunks.
-       * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * @return The bytes for mimeType. */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder - getChunksOrBuilder(int index) { - if (chunksBuilder_ == null) { - return chunks_.get(index); + 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 chunksBuilder_.getMessageOrBuilder(index); + return (com.google.protobuf.ByteString) ref; } } @@ -85096,107 +94651,89 @@ public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder get * * *
-       * List of chunks.
+       * The mime type of the blob asset.
+       * An IANA published [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * string mime_type = 3; + * + * @param value The mimeType to set. + * @return This builder for chaining. */ - public java.util.List< - ? extends com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder> - getChunksOrBuilderList() { - if (chunksBuilder_ != null) { - return chunksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(chunks_); + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + mimeType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** * * *
-       * List of chunks.
+       * The mime type of the blob asset.
+       * An IANA published [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * - */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder - addChunksBuilder() { - return internalGetChunksFieldBuilder() - .addBuilder( - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.getDefaultInstance()); - } - - /** - * + * string mime_type = 3; * - *
-       * List of chunks.
-       * 
- * - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * @return This builder for chaining. */ - public com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder addChunksBuilder( - int index) { - return internalGetChunksFieldBuilder() - .addBuilder( - index, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.getDefaultInstance()); + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; } /** * * *
-       * List of chunks.
+       * The mime type of the blob asset.
+       * An IANA published [media type (MIME
+       * type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
        * 
* - * repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1; - * + * string mime_type = 3; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. */ - public java.util.List - getChunksBuilderList() { - return internalGetChunksFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder> - internalGetChunksFieldBuilder() { - if (chunksBuilder_ == null) { - chunksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk, - com.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.Builder, - com.google.cloud.documentai.v1.Document.ChunkedDocument.ChunkOrBuilder>( - chunks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - chunks_ = null; + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return chunksBuilder_; + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.ChunkedDocument) + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.Document.BlobAsset) } - // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.ChunkedDocument) - private static final com.google.cloud.documentai.v1.Document.ChunkedDocument DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.Document.BlobAsset) + private static final com.google.cloud.documentai.v1.Document.BlobAsset DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.Document.ChunkedDocument(); + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.Document.BlobAsset(); } - public static com.google.cloud.documentai.v1.Document.ChunkedDocument getDefaultInstance() { + public static com.google.cloud.documentai.v1.Document.BlobAsset 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 ChunkedDocument parsePartialFrom( + public BlobAsset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -85216,17 +94753,17 @@ public ChunkedDocument 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.documentai.v1.Document.ChunkedDocument getDefaultInstanceForType() { + public com.google.cloud.documentai.v1.Document.BlobAsset getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -90582,6 +100119,108 @@ public com.google.cloud.documentai.v1.Document.ChunkedDocument getChunkedDocumen : chunkedDocument_; } + public static final int BLOB_ASSETS_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private java.util.List blobAssets_; + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getBlobAssetsList() { + return blobAssets_; + } + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getBlobAssetsOrBuilderList() { + return blobAssets_; + } + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getBlobAssetsCount() { + return blobAssets_.size(); + } + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.BlobAsset getBlobAssets(int index) { + return blobAssets_.get(index); + } + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1.Document.BlobAssetOrBuilder getBlobAssetsOrBuilder( + int index) { + return blobAssets_.get(index); + } + public static final int ENTITY_VALIDATION_OUTPUT_FIELD_NUMBER = 21; private com.google.cloud.documentai.v1.Document.EntityValidationOutput entityValidationOutput_; @@ -90752,7 +100391,7 @@ public com.google.cloud.documentai.v1.Document.EntitiesRevision getEntitiesRevis * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. *
* @@ -90780,7 +100419,7 @@ public java.lang.String getEntitiesRevisionId() { * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * @@ -90860,6 +100499,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(18, getChunkedDocument()); } + for (int i = 0; i < blobAssets_.size(); i++) { + output.writeMessage(19, blobAssets_.get(i)); + } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(21, getEntityValidationOutput()); } @@ -90925,6 +100567,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getChunkedDocument()); } + for (int i = 0; i < blobAssets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, blobAssets_.get(i)); + } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getEntityValidationOutput()); @@ -90976,6 +100621,7 @@ public boolean equals(final java.lang.Object obj) { if (hasChunkedDocument()) { if (!getChunkedDocument().equals(other.getChunkedDocument())) return false; } + if (!getBlobAssetsList().equals(other.getBlobAssetsList())) return false; if (hasEntityValidationOutput() != other.hasEntityValidationOutput()) return false; if (hasEntityValidationOutput()) { if (!getEntityValidationOutput().equals(other.getEntityValidationOutput())) return false; @@ -91050,6 +100696,10 @@ public int hashCode() { hash = (37 * hash) + CHUNKED_DOCUMENT_FIELD_NUMBER; hash = (53 * hash) + getChunkedDocument().hashCode(); } + if (getBlobAssetsCount() > 0) { + hash = (37 * hash) + BLOB_ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getBlobAssetsList().hashCode(); + } if (hasEntityValidationOutput()) { hash = (37 * hash) + ENTITY_VALIDATION_OUTPUT_FIELD_NUMBER; hash = (53 * hash) + getEntityValidationOutput().hashCode(); @@ -91226,6 +100876,7 @@ private void maybeForceBuilderInitialization() { internalGetRevisionsFieldBuilder(); internalGetDocumentLayoutFieldBuilder(); internalGetChunkedDocumentFieldBuilder(); + internalGetBlobAssetsFieldBuilder(); internalGetEntityValidationOutputFieldBuilder(); internalGetEntitiesRevisionsFieldBuilder(); } @@ -91300,6 +100951,13 @@ public Builder clear() { chunkedDocumentBuilder_.dispose(); chunkedDocumentBuilder_ = null; } + if (blobAssetsBuilder_ == null) { + blobAssets_ = java.util.Collections.emptyList(); + } else { + blobAssets_ = null; + blobAssetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00008000); entityValidationOutput_ = null; if (entityValidationOutputBuilder_ != null) { entityValidationOutputBuilder_.dispose(); @@ -91311,7 +100969,7 @@ public Builder clear() { entitiesRevisions_ = null; entitiesRevisionsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); entitiesRevisionId_ = ""; sourceCase_ = 0; source_ = null; @@ -91406,10 +101064,19 @@ private void buildPartialRepeatedFields(com.google.cloud.documentai.v1.Document } else { result.revisions_ = revisionsBuilder_.build(); } + if (blobAssetsBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0)) { + blobAssets_ = java.util.Collections.unmodifiableList(blobAssets_); + bitField0_ = (bitField0_ & ~0x00008000); + } + result.blobAssets_ = blobAssets_; + } else { + result.blobAssets_ = blobAssetsBuilder_.build(); + } if (entitiesRevisionsBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0)) { + if (((bitField0_ & 0x00020000) != 0)) { entitiesRevisions_ = java.util.Collections.unmodifiableList(entitiesRevisions_); - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); } result.entitiesRevisions_ = entitiesRevisions_; } else { @@ -91447,14 +101114,14 @@ private void buildPartial0(com.google.cloud.documentai.v1.Document result) { chunkedDocumentBuilder_ == null ? chunkedDocument_ : chunkedDocumentBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.entityValidationOutput_ = entityValidationOutputBuilder_ == null ? entityValidationOutput_ : entityValidationOutputBuilder_.build(); to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.entitiesRevisionId_ = entitiesRevisionId_; } result.bitField0_ |= to_bitField0_; @@ -91666,6 +101333,33 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document other) { if (other.hasChunkedDocument()) { mergeChunkedDocument(other.getChunkedDocument()); } + if (blobAssetsBuilder_ == null) { + if (!other.blobAssets_.isEmpty()) { + if (blobAssets_.isEmpty()) { + blobAssets_ = other.blobAssets_; + bitField0_ = (bitField0_ & ~0x00008000); + } else { + ensureBlobAssetsIsMutable(); + blobAssets_.addAll(other.blobAssets_); + } + onChanged(); + } + } else { + if (!other.blobAssets_.isEmpty()) { + if (blobAssetsBuilder_.isEmpty()) { + blobAssetsBuilder_.dispose(); + blobAssetsBuilder_ = null; + blobAssets_ = other.blobAssets_; + bitField0_ = (bitField0_ & ~0x00008000); + blobAssetsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBlobAssetsFieldBuilder() + : null; + } else { + blobAssetsBuilder_.addAllMessages(other.blobAssets_); + } + } + } if (other.hasEntityValidationOutput()) { mergeEntityValidationOutput(other.getEntityValidationOutput()); } @@ -91673,7 +101367,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document other) { if (!other.entitiesRevisions_.isEmpty()) { if (entitiesRevisions_.isEmpty()) { entitiesRevisions_ = other.entitiesRevisions_; - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); } else { ensureEntitiesRevisionsIsMutable(); entitiesRevisions_.addAll(other.entitiesRevisions_); @@ -91686,7 +101380,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document other) { entitiesRevisionsBuilder_.dispose(); entitiesRevisionsBuilder_ = null; entitiesRevisions_ = other.entitiesRevisions_; - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); entitiesRevisionsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetEntitiesRevisionsFieldBuilder() @@ -91698,7 +101392,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document other) { } if (!other.getEntitiesRevisionId().isEmpty()) { entitiesRevisionId_ = other.entitiesRevisionId_; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } switch (other.getSourceCase()) { @@ -91884,12 +101578,26 @@ public Builder mergeFrom( bitField0_ |= 0x00004000; break; } // case 146 + case 154: + { + com.google.cloud.documentai.v1.Document.BlobAsset m = + input.readMessage( + com.google.cloud.documentai.v1.Document.BlobAsset.parser(), + extensionRegistry); + if (blobAssetsBuilder_ == null) { + ensureBlobAssetsIsMutable(); + blobAssets_.add(m); + } else { + blobAssetsBuilder_.addMessage(m); + } + break; + } // case 154 case 170: { input.readMessage( internalGetEntityValidationOutputFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 170 case 178: @@ -91909,7 +101617,7 @@ public Builder mergeFrom( case 186: { entitiesRevisionId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 186 default: @@ -95721,6 +105429,470 @@ public Builder clearChunkedDocument() { return chunkedDocumentBuilder_; } + private java.util.List blobAssets_ = + java.util.Collections.emptyList(); + + private void ensureBlobAssetsIsMutable() { + if (!((bitField0_ & 0x00008000) != 0)) { + blobAssets_ = + new java.util.ArrayList(blobAssets_); + bitField0_ |= 0x00008000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.BlobAsset, + com.google.cloud.documentai.v1.Document.BlobAsset.Builder, + com.google.cloud.documentai.v1.Document.BlobAssetOrBuilder> + blobAssetsBuilder_; + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getBlobAssetsList() { + if (blobAssetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(blobAssets_); + } else { + return blobAssetsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getBlobAssetsCount() { + if (blobAssetsBuilder_ == null) { + return blobAssets_.size(); + } else { + return blobAssetsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1.Document.BlobAsset getBlobAssets(int index) { + if (blobAssetsBuilder_ == null) { + return blobAssets_.get(index); + } else { + return blobAssetsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBlobAssets( + int index, com.google.cloud.documentai.v1.Document.BlobAsset value) { + if (blobAssetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlobAssetsIsMutable(); + blobAssets_.set(index, value); + onChanged(); + } else { + blobAssetsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBlobAssets( + int index, com.google.cloud.documentai.v1.Document.BlobAsset.Builder builderForValue) { + if (blobAssetsBuilder_ == null) { + ensureBlobAssetsIsMutable(); + blobAssets_.set(index, builderForValue.build()); + onChanged(); + } else { + blobAssetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBlobAssets(com.google.cloud.documentai.v1.Document.BlobAsset value) { + if (blobAssetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlobAssetsIsMutable(); + blobAssets_.add(value); + onChanged(); + } else { + blobAssetsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBlobAssets( + int index, com.google.cloud.documentai.v1.Document.BlobAsset value) { + if (blobAssetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlobAssetsIsMutable(); + blobAssets_.add(index, value); + onChanged(); + } else { + blobAssetsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBlobAssets( + com.google.cloud.documentai.v1.Document.BlobAsset.Builder builderForValue) { + if (blobAssetsBuilder_ == null) { + ensureBlobAssetsIsMutable(); + blobAssets_.add(builderForValue.build()); + onChanged(); + } else { + blobAssetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBlobAssets( + int index, com.google.cloud.documentai.v1.Document.BlobAsset.Builder builderForValue) { + if (blobAssetsBuilder_ == null) { + ensureBlobAssetsIsMutable(); + blobAssets_.add(index, builderForValue.build()); + onChanged(); + } else { + blobAssetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllBlobAssets( + java.lang.Iterable values) { + if (blobAssetsBuilder_ == null) { + ensureBlobAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blobAssets_); + onChanged(); + } else { + blobAssetsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBlobAssets() { + if (blobAssetsBuilder_ == null) { + blobAssets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + } else { + blobAssetsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeBlobAssets(int index) { + if (blobAssetsBuilder_ == null) { + ensureBlobAssetsIsMutable(); + blobAssets_.remove(index); + onChanged(); + } else { + blobAssetsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1.Document.BlobAsset.Builder getBlobAssetsBuilder( + int index) { + return internalGetBlobAssetsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1.Document.BlobAssetOrBuilder getBlobAssetsOrBuilder( + int index) { + if (blobAssetsBuilder_ == null) { + return blobAssets_.get(index); + } else { + return blobAssetsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBlobAssetsOrBuilderList() { + if (blobAssetsBuilder_ != null) { + return blobAssetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blobAssets_); + } + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1.Document.BlobAsset.Builder addBlobAssetsBuilder() { + return internalGetBlobAssetsFieldBuilder() + .addBuilder(com.google.cloud.documentai.v1.Document.BlobAsset.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1.Document.BlobAsset.Builder addBlobAssetsBuilder( + int index) { + return internalGetBlobAssetsFieldBuilder() + .addBuilder( + index, com.google.cloud.documentai.v1.Document.BlobAsset.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The blob assets in this document. This is used to store the
+     * content of the inline blobs in this document, for example, image bytes,
+     * such that it can be referenced by other fields in the document via asset
+     * id.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBlobAssetsBuilderList() { + return internalGetBlobAssetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.BlobAsset, + com.google.cloud.documentai.v1.Document.BlobAsset.Builder, + com.google.cloud.documentai.v1.Document.BlobAssetOrBuilder> + internalGetBlobAssetsFieldBuilder() { + if (blobAssetsBuilder_ == null) { + blobAssetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.documentai.v1.Document.BlobAsset, + com.google.cloud.documentai.v1.Document.BlobAsset.Builder, + com.google.cloud.documentai.v1.Document.BlobAssetOrBuilder>( + blobAssets_, ((bitField0_ & 0x00008000) != 0), getParentForChildren(), isClean()); + blobAssets_ = null; + } + return blobAssetsBuilder_; + } + private com.google.cloud.documentai.v1.Document.EntityValidationOutput entityValidationOutput_; private com.google.protobuf.SingleFieldBuilder< com.google.cloud.documentai.v1.Document.EntityValidationOutput, @@ -95743,7 +105915,7 @@ public Builder clearChunkedDocument() { * @return Whether the entityValidationOutput field is set. */ public boolean hasEntityValidationOutput() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** @@ -95793,7 +105965,7 @@ public Builder setEntityValidationOutput( } else { entityValidationOutputBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -95817,7 +105989,7 @@ public Builder setEntityValidationOutput( } else { entityValidationOutputBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -95837,7 +106009,7 @@ public Builder setEntityValidationOutput( public Builder mergeEntityValidationOutput( com.google.cloud.documentai.v1.Document.EntityValidationOutput value) { if (entityValidationOutputBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && entityValidationOutput_ != null && entityValidationOutput_ != com.google.cloud.documentai.v1.Document.EntityValidationOutput @@ -95850,7 +106022,7 @@ public Builder mergeEntityValidationOutput( entityValidationOutputBuilder_.mergeFrom(value); } if (entityValidationOutput_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -95869,7 +106041,7 @@ public Builder mergeEntityValidationOutput( * */ public Builder clearEntityValidationOutput() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); entityValidationOutput_ = null; if (entityValidationOutputBuilder_ != null) { entityValidationOutputBuilder_.dispose(); @@ -95893,7 +106065,7 @@ public Builder clearEntityValidationOutput() { */ public com.google.cloud.documentai.v1.Document.EntityValidationOutput.Builder getEntityValidationOutputBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return internalGetEntityValidationOutputFieldBuilder().getBuilder(); } @@ -95954,11 +106126,11 @@ public Builder clearEntityValidationOutput() { entitiesRevisions_ = java.util.Collections.emptyList(); private void ensureEntitiesRevisionsIsMutable() { - if (!((bitField0_ & 0x00010000) != 0)) { + if (!((bitField0_ & 0x00020000) != 0)) { entitiesRevisions_ = new java.util.ArrayList( entitiesRevisions_); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; } } @@ -96225,7 +106397,7 @@ public Builder addAllEntitiesRevisions( public Builder clearEntitiesRevisions() { if (entitiesRevisionsBuilder_ == null) { entitiesRevisions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); onChanged(); } else { entitiesRevisionsBuilder_.clear(); @@ -96383,7 +106555,7 @@ public Builder removeEntitiesRevisions(int index) { com.google.cloud.documentai.v1.Document.EntitiesRevision.Builder, com.google.cloud.documentai.v1.Document.EntitiesRevisionOrBuilder>( entitiesRevisions_, - ((bitField0_ & 0x00010000) != 0), + ((bitField0_ & 0x00020000) != 0), getParentForChildren(), isClean()); entitiesRevisions_ = null; @@ -96400,7 +106572,7 @@ public Builder removeEntitiesRevisions(int index) { * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * @@ -96427,7 +106599,7 @@ public java.lang.String getEntitiesRevisionId() { * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * @@ -96454,7 +106626,7 @@ public com.google.protobuf.ByteString getEntitiesRevisionIdBytes() { * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * @@ -96468,7 +106640,7 @@ public Builder setEntitiesRevisionId(java.lang.String value) { throw new NullPointerException(); } entitiesRevisionId_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -96480,7 +106652,7 @@ public Builder setEntitiesRevisionId(java.lang.String value) { * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * @@ -96490,7 +106662,7 @@ public Builder setEntitiesRevisionId(java.lang.String value) { */ public Builder clearEntitiesRevisionId() { entitiesRevisionId_ = getDefaultInstance().getEntitiesRevisionId(); - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); onChanged(); return this; } @@ -96502,7 +106674,7 @@ public Builder clearEntitiesRevisionId() { * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * @@ -96517,7 +106689,7 @@ public Builder setEntitiesRevisionIdBytes(com.google.protobuf.ByteString value) } checkByteStringIsUtf8(value); entitiesRevisionId_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentOrBuilder.java index bef3f04f8bc2..44117b70a087 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentOrBuilder.java @@ -712,6 +712,87 @@ com.google.cloud.documentai.v1.Document.EntityRelationOrBuilder getEntityRelatio */ com.google.cloud.documentai.v1.Document.ChunkedDocumentOrBuilder getChunkedDocumentOrBuilder(); + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getBlobAssetsList(); + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1.Document.BlobAsset getBlobAssets(int index); + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getBlobAssetsCount(); + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getBlobAssetsOrBuilderList(); + + /** + * + * + *
+   * Optional. The blob assets in this document. This is used to store the
+   * content of the inline blobs in this document, for example, image bytes,
+   * such that it can be referenced by other fields in the document via asset
+   * id.
+   * 
+ * + * + * repeated .google.cloud.documentai.v1.Document.BlobAsset blob_assets = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1.Document.BlobAssetOrBuilder getBlobAssetsOrBuilder(int index); + /** * * @@ -839,7 +920,7 @@ com.google.cloud.documentai.v1.Document.EntitiesRevisionOrBuilder getEntitiesRev * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * @@ -856,7 +937,7 @@ com.google.cloud.documentai.v1.Document.EntitiesRevisionOrBuilder getEntitiesRev * The entity revision ID that `document.entities` field is based on. * If this field is set and `entities_revisions` is not empty, the entities in * `document.entities` field are the entities in the entity revision with this - * ID and `document.entity_validation_output` field is the + * id and `document.entity_validation_output` field is the * `entity_validation_output` field in this entity revision. * * diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java index 1765c678db5a..309e49a1a1e7 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java @@ -188,6 +188,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1_Document_TextChange_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_documentai_v1_Document_TextChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_Document_Annotations_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_documentai_v1_Document_Annotations_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -224,6 +228,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -244,6 +252,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageFooter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1_Document_BlobAsset_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_documentai_v1_Document_BlobAsset_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1_Document_EntityValidationOutput_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -268,54 +292,57 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n" + ")google/cloud/documentai/v1/document.pr" + "oto\022\032google.cloud.documentai.v1\032\037google/" - + "api/field_behavior.proto\032(google/cloud/documentai/v1/barcode.proto\032)google/cloud" - + "/documentai/v1/geometry.proto\032\037google/pr" - + "otobuf/timestamp.proto\032\027google/rpc/statu" - + "s.proto\032\027google/type/color.proto\032\026google" - + "/type/date.proto\032\032google/type/datetime.proto\032\027google/type/money.proto\032" - + " google/type/postal_address.proto\"\240b\n" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\032(google/cloud/documentai/v1/barcode.proto\032)google/cloud/documentai/v" + + "1/geometry.proto\032\037google/protobuf/timest" + + "amp.proto\032\027google/rpc/status.proto\032\027goog" + + "le/type/color.proto\032\026google/type/date.pr" + + "oto\032\032google/type/datetime.proto\032\027google/type/money.proto\032" + + " google/type/postal_address.proto\"\234l\n" + "\010Document\022\022\n" + "\003uri\030\001 \001(\tB\003\340A\001H\000\022\026\n" + "\007content\030\002 \001(\014B\003\340A\001H\000\022\022\n" + "\005docid\030\017 \001(\tB\003\340A\001\022\021\n" + "\tmime_type\030\003 \001(\t\022\021\n" + "\004text\030\004 \001(\tB\003\340A\001\022C\n" - + "\013text_styles\030\005 \003(\0132" - + "*.google.cloud.documentai.v1.Document.StyleB\002\030\001\0228\n" + + "\013text_styles\030\005" + + " \003(\0132*.google.cloud.documentai.v1.Document.StyleB\002\030\001\0228\n" + "\005pages\030\006 \003(\0132).google.cloud.documentai.v1.Document.Page\022=\n" + "\010entities\030\007 \003(\0132+.google.cloud.documentai.v1.Document.Entity\022M\n" - + "\020entity_relations\030\010 \003(\01323.goo" - + "gle.cloud.documentai.v1.Document.EntityRelation\022E\n" - + "\014text_changes\030\016 \003(\0132/.google.c" - + "loud.documentai.v1.Document.TextChange\022B\n\n" + + "\020entity_relations\030\010" + + " \003(\01323.google.cloud.documentai.v1.Document.EntityRelation\022E\n" + + "\014text_changes\030\016" + + " \003(\0132/.google.cloud.documentai.v1.Document.TextChange\022B\n\n" + "shard_info\030\t \001(\0132..google.cloud.documentai.v1.Document.ShardInfo\022!\n" + "\005error\030\n" + " \001(\0132\022.google.rpc.Status\022@\n" + "\trevisions\030\r" + " \003(\0132-.google.cloud.documentai.v1.Document.Revision\022L\n" - + "\017document_layout\030\021 \001(\01323.googl" - + "e.cloud.documentai.v1.Document.DocumentLayout\022N\n" - + "\020chunked_document\030\022 \001(\01324.google" - + ".cloud.documentai.v1.Document.ChunkedDocument\022]\n" - + "\030entity_validation_output\030\025 \001(\0132" - + ";.google.cloud.documentai.v1.Document.EntityValidationOutput\022Q\n" - + "\022entities_revisions\030\026" - + " \003(\01325.google.cloud.documentai.v1.Document.EntitiesRevision\022\034\n" + + "\017document_layout\030\021" + + " \001(\01323.google.cloud.documentai.v1.Document.DocumentLayout\022N\n" + + "\020chunked_document\030\022" + + " \001(\01324.google.cloud.documentai.v1.Document.ChunkedDocument\022H\n" + + "\013blob_assets\030\023" + + " \003(\0132..google.cloud.documentai.v1.Document.BlobAssetB\003\340A\001\022]\n" + + "\030entity_validation_output\030\025 \001(\0132;.google.cloud.docu" + + "mentai.v1.Document.EntityValidationOutput\022Q\n" + + "\022entities_revisions\030\026 \003(\01325.google.c" + + "loud.documentai.v1.Document.EntitiesRevision\022\034\n" + "\024entities_revision_id\030\027 \001(\t\032J\n" + "\tShardInfo\022\023\n" + "\013shard_index\030\001 \001(\003\022\023\n" + "\013shard_count\030\002 \001(\003\022\023\n" + "\013text_offset\030\003 \001(\003\032\345\002\n" + "\005Style\022D\n" - + "\013text_anchor\030\001 \001(\013" - + "2/.google.cloud.documentai.v1.Document.TextAnchor\022!\n" + + "\013text_anchor\030\001" + + " \001(\0132/.google.cloud.documentai.v1.Document.TextAnchor\022!\n" + "\005color\030\002 \001(\0132\022.google.type.Color\022,\n" + "\020background_color\030\003 \001(\0132\022.google.type.Color\022\023\n" + "\013font_weight\030\004 \001(\t\022\022\n\n" + "text_style\030\005 \001(\t\022\027\n" + "\017text_decoration\030\006 \001(\t\022F\n" - + "\tfont_size\030\007" - + " \001(\01323.google.cloud.documentai.v1.Document.Style.FontSize\022\023\n" + + "\tfont_size\030\007 \001(\01323.g" + + "oogle.cloud.documentai.v1.Document.Style.FontSize\022\023\n" + "\013font_family\030\010 \001(\t\032&\n" + "\010FontSize\022\014\n" + "\004size\030\001 \001(\002\022\014\n" @@ -325,30 +352,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005image\030\r" + " \001(\0132/.google.cloud.documentai.v1.Document.Page.Image\022D\n\n" + "transforms\030\016 \003(\01320.google.cloud.documentai.v1.Document.Page.Matrix\022F\n" - + "\tdimension\030\002 \001(\01323.googl" - + "e.cloud.documentai.v1.Document.Page.Dimension\022@\n" + + "\tdimension\030\002" + + " \001(\01323.google.cloud.documentai.v1.Document.Page.Dimension\022@\n" + "\006layout\030\003 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022V\n" - + "\022detected_languages\030\004 \003(\0132:.google.cloud.docum" - + "entai.v1.Document.Page.DetectedLanguage\022?\n" + + "\022detected_languages\030\004 \003(\013" + + "2:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\022?\n" + "\006blocks\030\005 \003(\0132/.google.cloud.documentai.v1.Document.Page.Block\022G\n\n" - + "paragraphs\030\006" - + " \003(\01323.google.cloud.documentai.v1.Document.Page.Paragraph\022=\n" + + "paragraphs\030\006 \003(\01323.google.cloud" + + ".documentai.v1.Document.Page.Paragraph\022=\n" + "\005lines\030\007 \003(\0132..google.cloud.documentai.v1.Document.Page.Line\022?\n" + "\006tokens\030\010 \003(\0132/.google.cloud.documentai.v1.Document.Page.Token\022P\n" - + "\017visual_elements\030\t" - + " \003(\01327.google.cloud.documentai.v1.Document.Page.VisualElement\022?\n" + + "\017visual_elements\030\t \003(\01327.google" + + ".cloud.documentai.v1.Document.Page.VisualElement\022?\n" + "\006tables\030\n" + " \003(\0132/.google.cloud.documentai.v1.Document.Page.Table\022H\n" - + "\013form_fields\030\013 \003(\01323.goog" - + "le.cloud.documentai.v1.Document.Page.FormField\022A\n" + + "\013form_fields\030\013" + + " \003(\01323.google.cloud.documentai.v1.Document.Page.FormField\022A\n" + "\007symbols\030\014 \003(\01320.google.cloud.documentai.v1.Document.Page.Symbol\022T\n" - + "\021detected_barcodes\030\017 \003(\01329.google.cloud.docu" - + "mentai.v1.Document.Page.DetectedBarcode\022Z\n" - + "\024image_quality_scores\030\021 \001(\0132<.google.c" - + "loud.documentai.v1.Document.Page.ImageQualityScores\022G\n\n" - + "provenance\030\020 \001(\0132/.google" - + ".cloud.documentai.v1.Document.ProvenanceB\002\030\001\0328\n" - + "\tDimension\022\r\n" + + "\021detected_barcodes\030\017 \003(" + + "\01329.google.cloud.documentai.v1.Document.Page.DetectedBarcode\022Z\n" + + "\024image_quality_scores\030\021" + + " \001(\0132<.google.cloud.documentai.v1.Document.Page.ImageQualityScores\022G\n\n" + + "provenance\030\020" + + " \001(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\0328\n" + + "\tDimension\022\r" + + "\n" + "\005width\030\001 \001(\002\022\016\n" + "\006height\030\002 \001(\002\022\014\n" + "\004unit\030\003 \001(\t\032J\n" @@ -363,12 +391,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004type\030\003 \001(\005\022\014\n" + "\004data\030\004 \001(\014\032\335\002\n" + "\006Layout\022D\n" - + "\013text_anchor\030\001 \001(\0132/.g" - + "oogle.cloud.documentai.v1.Document.TextAnchor\022\022\n\n" + + "\013text_anchor\030\001" + + " \001(\0132/.google.cloud.documentai.v1.Document.TextAnchor\022\022\n\n" + "confidence\030\002 \001(\002\022?\n\r" + "bounding_poly\030\003 \001(\0132(.google.cloud.documentai.v1.BoundingPoly\022Q\n" - + "\013orientation\030\004 \001(\0162<.google" - + ".cloud.documentai.v1.Document.Page.Layout.Orientation\"e\n" + + "\013orientation\030\004" + + " \001(\0162<.google.cloud.documentai.v1.Document.Page.Layout.Orientation\"e\n" + "\013Orientation\022\033\n" + "\027ORIENTATION_UNSPECIFIED\020\000\022\013\n" + "\007PAGE_UP\020\001\022\016\n\n" @@ -377,36 +405,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tPAGE_LEFT\020\004\032\352\001\n" + "\005Block\022@\n" + "\006layout\030\001 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022V\n" - + "\022detected_languages\030\002 \003(\0132:.google.cloud.docu" - + "mentai.v1.Document.Page.DetectedLanguage\022G\n\n" - + "provenance\030\003" - + " \001(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\032\356\001\n" + + "\022detected_languages\030\002 \003(" + + "\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\022G\n\n" + + "provenance\030\003 \001(" + + "\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\032\356\001\n" + "\tParagraph\022@\n" + "\006layout\030\001 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022V\n" - + "\022detected_languages\030\002 \003(\0132:.google.cloud.doc" - + "umentai.v1.Document.Page.DetectedLanguage\022G\n\n" - + "provenance\030\003" - + " \001(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\032\351\001\n" + + "\022detected_languages\030\002 \003" + + "(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\022G\n\n" + + "provenance\030\003 \001" + + "(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\032\351\001\n" + "\004Line\022@\n" + "\006layout\030\001 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022V\n" - + "\022detected_languages\030\002" - + " \003(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\022G\n" - + "\n" - + "provenance\030\003" - + " \001(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\032\236\007\n" + + "\022detected_languages\030\002 \003(\0132:" + + ".google.cloud.documentai.v1.Document.Page.DetectedLanguage\022G\n\n" + + "provenance\030\003 \001(\0132/" + + ".google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\032\236\007\n" + "\005Token\022@\n" + "\006layout\030\001 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022U\n" - + "\016detected_break\030\002" - + " \001(\0132=.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak\022V\n" - + "\022detected_languages\030\003 \003(\0132:.google.cloud.doc" - + "umentai.v1.Document.Page.DetectedLanguage\022G\n\n" - + "provenance\030\004" - + " \001(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\022M\n\n" - + "style_info\030\005" - + " \001(\01329.google.cloud.documentai.v1.Document.Page.Token.StyleInfo\032\246\001\n\r" + + "\016detected_break\030\002 \001(\0132=.google" + + ".cloud.documentai.v1.Document.Page.Token.DetectedBreak\022V\n" + + "\022detected_languages\030\003 \003" + + "(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\022G\n\n" + + "provenance\030\004 \001" + + "(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\022M\n\n" + + "style_info\030\005 \001(\01329.go" + + "ogle.cloud.documentai.v1.Document.Page.Token.StyleInfo\032\246\001\n\r" + "DetectedBreak\022P\n" - + "\004type\030\001 \001(\0162B.google.cloud" - + ".documentai.v1.Document.Page.Token.DetectedBreak.Type\"C\n" + + "\004type\030\001" + + " \001(\0162B.google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type\"C\n" + "\004Type\022\024\n" + "\020TYPE_UNSPECIFIED\020\000\022\t\n" + "\005SPACE\020\001\022\016\n\n" @@ -432,47 +459,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020background_color\030\017 \001(\0132\022.google.type.Color\032\242\001\n" + "\006Symbol\022@\n" + "\006layout\030\001 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022V\n" - + "\022detected_languages\030\002 \003(\0132:.google.cloud." - + "documentai.v1.Document.Page.DetectedLanguage\032\267\001\n\r" + + "\022detected_languages\030\002" + + " \003(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\032\267\001\n\r" + "VisualElement\022@\n" - + "\006layout\030\001 \001(\01320" - + ".google.cloud.documentai.v1.Document.Page.Layout\022\014\n" + + "\006layout\030\001" + + " \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022\014\n" + "\004type\030\002 \001(\t\022V\n" - + "\022detected_languages\030\003" - + " \003(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\032\250\005\n" + + "\022detected_languages\030\003 \003(\0132:.google" + + ".cloud.documentai.v1.Document.Page.DetectedLanguage\032\250\005\n" + "\005Table\022@\n" + "\006layout\030\001 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022M\n" - + "\013header_rows\030\002" - + " \003(\01328.google.cloud.documentai.v1.Document.Page.Table.TableRow\022K\n" - + "\tbody_rows\030\003" - + " \003(\01328.google.cloud.documentai.v1.Document.Page.Table.TableRow\022V\n" - + "\022detected_languages\030\004" - + " \003(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\022G\n\n" - + "provenance\030\005" - + " \001(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\032T\n" + + "\013header_rows\030\002 \003(\01328.google.cl" + + "oud.documentai.v1.Document.Page.Table.TableRow\022K\n" + + "\tbody_rows\030\003 \003(\01328.google.cloud" + + ".documentai.v1.Document.Page.Table.TableRow\022V\n" + + "\022detected_languages\030\004 \003(\0132:.google" + + ".cloud.documentai.v1.Document.Page.DetectedLanguage\022G\n\n" + + "provenance\030\005 \001(\0132/.google" + + ".cloud.documentai.v1.Document.ProvenanceB\002\030\001\032T\n" + "\010TableRow\022H\n" - + "\005cells\030\001" - + " \003(\01329.google.cloud.documentai.v1.Document.Page.Table.TableCell\032\311\001\n" + + "\005cells\030\001 \003(\01329.google" + + ".cloud.documentai.v1.Document.Page.Table.TableCell\032\311\001\n" + "\tTableCell\022@\n" - + "\006layout\030\001" - + " \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022\020\n" + + "\006layout\030\001 \001(\013" + + "20.google.cloud.documentai.v1.Document.Page.Layout\022\020\n" + "\010row_span\030\002 \001(\005\022\020\n" + "\010col_span\030\003 \001(\005\022V\n" - + "\022detected_languages\030\004" - + " \003(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\032\346\003\n" + + "\022detected_languages\030\004 \003(\0132:.goo" + + "gle.cloud.documentai.v1.Document.Page.DetectedLanguage\032\346\003\n" + "\tFormField\022D\n\n" + "field_name\030\001 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022E\n" - + "\013field_value\030\002" - + " \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\022[\n" - + "\027name_detected_languages\030\003 \003(\0132:.google.cloud.doc" - + "umentai.v1.Document.Page.DetectedLanguage\022\\\n" - + "\030value_detected_languages\030\004 \003(\0132:.go" - + "ogle.cloud.documentai.v1.Document.Page.DetectedLanguage\022\022\n\n" + + "\013field_value\030\002 \001(\0132" + + "0.google.cloud.documentai.v1.Document.Page.Layout\022[\n" + + "\027name_detected_languages\030\003 \003" + + "(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\022\\\n" + + "\030value_detected_languages\030\004" + + " \003(\0132:.google.cloud.documentai.v1.Document.Page.DetectedLanguage\022\022\n\n" + "value_type\030\005 \001(\t\022\032\n" + "\022corrected_key_text\030\006 \001(\t\022\034\n" + "\024corrected_value_text\030\007 \001(\t\022C\n\n" - + "provenance\030\010 \001(\0132/.goog" - + "le.cloud.documentai.v1.Document.Provenance\032\211\001\n" + + "provenance\030\010" + + " \001(\0132/.google.cloud.documentai.v1.Document.Provenance\032\211\001\n" + "\017DetectedBarcode\022@\n" + "\006layout\030\001 \001(\01320.google.cloud.documentai.v1.Document.Page.Layout\0224\n" + "\007barcode\030\002 \001(\0132#.google.cloud.documentai.v1.Barcode\032=\n" @@ -481,30 +508,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "confidence\030\002 \001(\002\032\306\001\n" + "\022ImageQualityScores\022\025\n\r" + "quality_score\030\001 \001(\002\022e\n" - + "\020detected_defects\030\002 \003(\0132K." - + "google.cloud.documentai.v1.Document.Page.ImageQualityScores.DetectedDefect\0322\n" + + "\020detected_defects\030\002 \003(\0132K.google.cloud.docume" + + "ntai.v1.Document.Page.ImageQualityScores.DetectedDefect\0322\n" + "\016DetectedDefect\022\014\n" + "\004type\030\001 \001(\t\022\022\n\n" + "confidence\030\002 \001(\002\032\357\007\n" + "\006Entity\022I\n" - + "\013text_anchor\030\001 \001(\0132/" - + ".google.cloud.documentai.v1.Document.TextAnchorB\003\340A\001\022\021\n" + + "\013text_anchor\030\001" + + " \001(\0132/.google.cloud.documentai.v1.Document.TextAnchorB\003\340A\001\022\021\n" + "\004type\030\002 \001(\tB\003\340A\002\022\031\n" + "\014mention_text\030\003 \001(\tB\003\340A\001\022\027\n\n" + "mention_id\030\004 \001(\tB\003\340A\001\022\027\n\n" + "confidence\030\005 \001(\002B\003\340A\001\022I\n" - + "\013page_anchor\030\006" - + " \001(\0132/.google.cloud.documentai.v1.Document.PageAnchorB\003\340A\001\022\017\n" + + "\013page_anchor\030\006 \001(\0132/.google." + + "cloud.documentai.v1.Document.PageAnchorB\003\340A\001\022\017\n" + "\002id\030\007 \001(\tB\003\340A\001\022Z\n" - + "\020normalized_value\030\t \001(\0132;.google.clou" - + "d.documentai.v1.Document.Entity.NormalizedValueB\003\340A\001\022D\n\n" + + "\020normalized_value\030\t" + + " \001(\0132;.google.cloud.documentai.v1.Document.Entity.NormalizedValueB\003\340A\001\022D\n\n" + "properties\030\n" + " \003(\0132+.google.cloud.documentai.v1.Document.EntityB\003\340A\001\022H\n\n" - + "provenance\030\013" - + " \001(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\003\340A\001\022\025\n" + + "provenance\030\013 " + + "\001(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\003\340A\001\022\025\n" + "\010redacted\030\014 \001(\010B\003\340A\001\022G\n" - + "\006method\030\017 \001(\01622.go" - + "ogle.cloud.documentai.v1.Document.Entity.MethodB\003\340A\001\032\326\002\n" + + "\006method\030\017" + + " \001(\01622.google.cloud.documentai.v1.Document.Entity.MethodB\003\340A\001\032\326\002\n" + "\017NormalizedValue\022)\n" + "\013money_value\030\002 \001(\0132\022.google.type.MoneyH\000\022\'\n\n" + "date_value\030\003 \001(\0132\021.google.type.DateH\000\022/\n" @@ -526,19 +553,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tobject_id\030\002 \001(\t\022\020\n" + "\010relation\030\003 \001(\t\032\250\001\n\n" + "TextAnchor\022R\n\r" - + "text_segments\030\001" - + " \003(\0132;.google.cloud.documentai.v1.Document.TextAnchor.TextSegment\022\017\n" + + "text_segments\030\001 \003(\0132;.google." + + "cloud.documentai.v1.Document.TextAnchor.TextSegment\022\017\n" + "\007content\030\002 \001(\t\0325\n" + "\013TextSegment\022\023\n" + "\013start_index\030\001 \001(\003\022\021\n" + "\tend_index\030\002 \001(\003\032\330\003\n\n" + "PageAnchor\022J\n" - + "\tpage_refs\030\001" - + " \003(\01327.google.cloud.documentai.v1.Document.PageAnchor.PageRef\032\375\002\n" + + "\tpage_refs\030\001 \003(\01327." + + "google.cloud.documentai.v1.Document.PageAnchor.PageRef\032\375\002\n" + "\007PageRef\022\021\n" + "\004page\030\001 \001(\003B\003\340A\002\022\\\n" - + "\013layout_type\030\002 \001(\0162B.google.cloud.documentai.v1.Docum" - + "ent.PageAnchor.PageRef.LayoutTypeB\003\340A\001\022\030\n" + + "\013layout_type\030\002 \001(\0162B.google.clou" + + "d.documentai.v1.Document.PageAnchor.PageRef.LayoutTypeB\003\340A\001\022\030\n" + "\tlayout_id\030\003 \001(\tB\005\030\001\340A\001\022D\n\r" + "bounding_poly\030\004" + " \001(\0132(.google.cloud.documentai.v1.BoundingPolyB\003\340A\001\022\027\n\n" @@ -555,10 +582,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Provenance\022\024\n" + "\010revision\030\001 \001(\005B\002\030\001\022\016\n" + "\002id\030\002 \001(\005B\002\030\001\022G\n" - + "\007parents\030\003" - + " \003(\01326.google.cloud.documentai.v1.Document.Provenance.Parent\022K\n" - + "\004type\030\004 \001(\0162=." - + "google.cloud.documentai.v1.Document.Provenance.OperationType\0329\n" + + "\007parents\030\003 \003(\01326.google.cl" + + "oud.documentai.v1.Document.Provenance.Parent\022K\n" + + "\004type\030\004 \001(\0162=.google.cloud.docume" + + "ntai.v1.Document.Provenance.OperationType\0329\n" + "\006Parent\022\020\n" + "\010revision\030\001 \001(\005\022\r\n" + "\005index\030\003 \001(\005\022\016\n" @@ -579,95 +606,135 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\002 \003(\005B\002\030\001\022\022\n\n" + "parent_ids\030\007 \003(\t\022/\n" + "\013create_time\030\003 \001(\0132\032.google.protobuf.Timestamp\022O\n" - + "\014human_review\030\006" - + " \001(\01329.google.cloud.documentai.v1.Document.Revision.HumanReview\0323\n" + + "\014human_review\030\006 \001(\0132" + + "9.google.cloud.documentai.v1.Document.Revision.HumanReview\0323\n" + "\013HumanReview\022\r\n" + "\005state\030\001 \001(\t\022\025\n\r" + "state_message\030\002 \001(\tB\010\n" + "\006source\032\261\001\n\n" + "TextChange\022D\n" - + "\013text_anchor\030\001" - + " \001(\0132/.google.cloud.documentai.v1.Document.TextAnchor\022\024\n" + + "\013text_anchor\030\001 \001(\0132/." + + "google.cloud.documentai.v1.Document.TextAnchor\022\024\n" + "\014changed_text\030\002 \001(\t\022G\n\n" - + "provenance\030\003 \003(\0132/.google.clo" - + "ud.documentai.v1.Document.ProvenanceB\002\030\001\032\335\014\n" + + "provenance\030\003" + + " \003(\0132/.google.cloud.documentai.v1.Document.ProvenanceB\002\030\001\032\"\n" + + "\013Annotations\022\023\n" + + "\013description\030\001 \001(\t\032\276\020\n" + "\016DocumentLayout\022W\n" - + "\006blocks\030\001 \003(\0132G.go" - + "ogle.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\032\361\013\n" + + "\006blocks\030\001 \003(\0132G.google.cloud.documentai.v" + + "1.Document.DocumentLayout.DocumentLayoutBlock\032\322\017\n" + "\023DocumentLayoutBlock\022m\n\n" - + "text_block\030\002 \001(\0132W.google.cloud.documentai.v1.Document.DocumentL" - + "ayout.DocumentLayoutBlock.LayoutTextBlockH\000\022o\n" - + "\013table_block\030\003 \001(\0132X.google.cloud." - + "documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlockH\000\022m\n\n" - + "list_block\030\004 \001(\0132W.google.cloud.document" - + "ai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlockH\000\022\020\n" + + "text_block\030\002 \001(\0132W.google.cloud.documentai.v1.D" + + "ocument.DocumentLayout.DocumentLayoutBlock.LayoutTextBlockH\000\022o\n" + + "\013table_block\030\003 \001(\0132X.google.cloud.documentai.v1.Document." + + "DocumentLayout.DocumentLayoutBlock.LayoutTableBlockH\000\022m\n\n" + + "list_block\030\004 \001(\0132W.google.cloud.documentai.v1.Document.Document" + + "Layout.DocumentLayoutBlock.LayoutListBlockH\000\022o\n" + + "\013image_block\030\007 \001(\0132X.google.cloud" + + ".documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockH\000\022\020\n" + "\010block_id\030\001 \001(\t\022i\n" - + "\tpage_span\030\005 \001(\0132V.google.cloud." - + "documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan\022>\n" + + "\tpage_span\030\005 \001(\0132V.google.cloud.documentai.v1.Document.Documen" + + "tLayout.DocumentLayoutBlock.LayoutPageSpan\022>\n" + "\014bounding_box\030\006 \001(\0132(.google.cloud.documentai.v1.BoundingPoly\0326\n" + "\016LayoutPageSpan\022\022\n\n" + "page_start\030\001 \001(\005\022\020\n" - + "\010page_end\030\002 \001(\005\032\206\001\n" + + "\010page_end\030\002 \001(\005\032\315\001\n" + "\017LayoutTextBlock\022\014\n" + "\004text\030\001 \001(\t\022\014\n" + "\004type\030\002 \001(\t\022W\n" - + "\006blocks\030\003 \003(\0132G.google.cloud.document" - + "ai.v1.Document.DocumentLayout.DocumentLayoutBlock\032\373\001\n" + + "\006blocks\030\003 \003(\0132G.google.clou" + + "d.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock\022E\n" + + "\013annotations\030\004 \001(\013" + + "20.google.cloud.documentai.v1.Document.Annotations\032\302\002\n" + "\020LayoutTableBlock\022k\n" - + "\013header_rows\030\001 \003(\0132V.google.cloud.documentai.v1" - + ".Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\022i\n" - + "\tbody_rows\030\002 \003(\0132V.google.cloud.documentai.v1.Document.Doc" - + "umentLayout.DocumentLayoutBlock.LayoutTableRow\022\017\n" - + "\007caption\030\003 \001(\t\032x\n" + + "\013header_rows\030\001 \003(\0132V.google.cloud.documentai.v" + + "1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow\022i\n" + + "\tbody_rows\030\002 \003(\0132V.google.cloud.documentai.v1.Document.Do" + + "cumentLayout.DocumentLayoutBlock.LayoutTableRow\022\017\n" + + "\007caption\030\003 \001(\t\022E\n" + + "\013annotations\030\004" + + " \001(\01320.google.cloud.documentai.v1.Document.Annotations\032x\n" + "\016LayoutTableRow\022f\n" - + "\005cells\030\001 \003(\0132W.google.cloud.document" - + "ai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell\032\216\001\n" + + "\005cells\030\001 \003(\0132W.google.cloud.documentai.v1.Do" + + "cument.DocumentLayout.DocumentLayoutBlock.LayoutTableCell\032\216\001\n" + "\017LayoutTableCell\022W\n" - + "\006blocks\030\001 \003(\0132G.google.cloud.doc" - + "umentai.v1.Document.DocumentLayout.DocumentLayoutBlock\022\020\n" + + "\006blocks\030\001 \003(\0132G.google.cloud.documentai." + + "v1.Document.DocumentLayout.DocumentLayoutBlock\022\020\n" + "\010row_span\030\002 \001(\005\022\020\n" + "\010col_span\030\003 \001(\005\032\216\001\n" + "\017LayoutListBlock\022m\n" - + "\014list_entries\030\001 \003(\0132W.google.cloud.documentai.v" - + "1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry\022\014\n" + + "\014list_entries\030\001 \003(\0132W.google.cloud.documentai.v1.Docume" + + "nt.DocumentLayout.DocumentLayoutBlock.LayoutListEntry\022\014\n" + "\004type\030\002 \001(\t\032j\n" + "\017LayoutListEntry\022W\n" - + "\006blocks\030\001 \003(\0132G.google." - + "cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockB\007\n" - + "\005block\032\370\005\n" + + "\006blocks\030\001 \003(\0132G.google.cloud.do" + + "cumentai.v1.Document.DocumentLayout.DocumentLayoutBlock\032\337\001\n" + + "\020LayoutImageBlock\022\034\n\r" + + "blob_asset_id\030\004 \001(\tB\003\340A\001H\000\022\026\n" + + "\007gcs_uri\030\005 \001(\tB\003\340A\001H\000\022\027\n" + + "\010data_uri\030\006 \001(\tB\003\340A\001H\000\022\021\n" + + "\tmime_type\030\001 \001(\t\022\022\n\n" + + "image_text\030\002 \001(\t\022E\n" + + "\013annotations\030\003" + + " \001(\01320.google.cloud.documentai.v1.Document.AnnotationsB\016\n" + + "\014image_sourceB\007\n" + + "\005block\032\330\n\n" + "\017ChunkedDocument\022J\n" - + "\006chunks\030\001 \003(\0132:.google.cl" - + "oud.documentai.v1.Document.ChunkedDocument.Chunk\032\230\005\n" + + "\006chunks\030\001" + + " \003(\0132:.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk\032\370\t\n" + "\005Chunk\022\020\n" + "\010chunk_id\030\001 \001(\t\022\030\n" + "\020source_block_ids\030\002 \003(\t\022\017\n" + "\007content\030\003 \001(\t\022[\n" - + "\tpage_span\030\004 \001(\0132H.google.cloud.docume" - + "ntai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\022`\n" - + "\014page_headers\030\005 \003(\0132J.goo" - + "gle.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageHeader\022`\n" - + "\014page_footers\030\006 \003(\0132J.google.cloud.documentai.v" - + "1.Document.ChunkedDocument.Chunk.ChunkPageFooter\0325\n\r" + + "\tpage_span\030\004 \001(\0132H.g" + + "oogle.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\022`\n" + + "\014page_headers\030\005 \003(\0132J.google.cloud.documentai.v" + + "1.Document.ChunkedDocument.Chunk.ChunkPageHeader\022`\n" + + "\014page_footers\030\006 \003(\0132J.google." + + "cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter\022[\n" + + "\014chunk_fields\030\007 \003(\0132E.google.cloud.documentai.v1.Do" + + "cument.ChunkedDocument.Chunk.ChunkField\0325\n\r" + "ChunkPageSpan\022\022\n\n" + "page_start\030\001 \001(\005\022\020\n" + "\010page_end\030\002 \001(\005\032|\n" + "\017ChunkPageHeader\022\014\n" + "\004text\030\001 \001(\t\022[\n" - + "\tpage_span\030\002 \001(\0132H.go" - + "ogle.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\032|\n" + + "\tpage_span\030\002 \001(\0132H.google.clou" + + "d.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\032|\n" + "\017ChunkPageFooter\022\014\n" + "\004text\030\001 \001(\t\022[\n" - + "\tpage_span\030\002 \001(" - + "\0132H.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\032\322\004\n" + + "\tpage_span\030\002 \001(\0132H.googl" + + "e.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageSpan\032\267\001\n" + + "\017ImageChunkField\022\034\n\r" + + "blob_asset_id\030\001 \001(\tB\003\340A\001H\000\022\026\n" + + "\007gcs_uri\030\002 \001(\tB\003\340A\001H\000\022\027\n" + + "\010data_uri\030\003 \001(\tB\003\340A\001H\000\022E\n" + + "\013annotations\030\004" + + " \001(\01320.google.cloud.documentai.v1.Document.AnnotationsB\016\n" + + "\014image_source\032X\n" + + "\017TableChunkField\022E\n" + + "\013annotations\030\001" + + " \001(\01320.google.cloud.documentai.v1.Document.Annotations\032\354\001\n\n" + + "ChunkField\022g\n" + + "\021image_chunk_field\030\001 \001(\0132J.google.cloud." + + "documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkFieldH\000\022g\n" + + "\021table_chunk_field\030\002 \001(\0132J.google.cloud.documentai.v1.D" + + "ocument.ChunkedDocument.Chunk.TableChunkFieldH\000B\014\n\n" + + "field_type\032K\n" + + "\tBlobAsset\022\025\n" + + "\010asset_id\030\001 \001(\tB\003\340A\001\022\024\n" + + "\007content\030\002 \001(\014B\003\340A\001\022\021\n" + + "\tmime_type\030\003 \001(\t\032\322\004\n" + "\026EntityValidationOutput\022h\n" - + "\022validation_results\030\001 \003(\0132L.google.cloud.documentai.v1." - + "Document.EntityValidationOutput.ValidationResult\022\026\n" + + "\022validation_results\030\001 \003(\0132L.goog" + + "le.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult\022\026\n" + "\016pass_all_rules\030\002 \001(\010\032\265\003\n" + "\020ValidationResult\022\021\n" + "\trule_name\030\001 \001(\t\022\030\n" + "\020rule_description\030\002 \001(\t\022\201\001\n" - + "\026validation_result_type\030\003 \001(\0162a.google.cloud.documentai.v1" - + ".Document.EntityValidationOutput.ValidationResult.ValidationResultType\022\032\n" + + "\026validation_result_type\030\003 \001(\0162a.goo" + + "gle.cloud.documentai.v1.Document.EntityV" + + "alidationOutput.ValidationResult.ValidationResultType\022\032\n" + "\022validation_details\030\004 \001(\t\"\323\001\n" + "\024ValidationResultType\022&\n" + "\"VALIDATION_RESULT_TYPE_UNSPECIFIED\020\000\022 \n" @@ -678,20 +745,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020EntitiesRevision\022\023\n" + "\013revision_id\030\001 \001(\t\022=\n" + "\010entities\030\002 \003(\0132+.google.cloud.documentai.v1.Document.Entity\022]\n" - + "\030entity_validation_output\030\003" - + " \001(\0132;.google.cloud.documentai.v1.Document.EntityValidationOutputB\010\n" + + "\030entity_validation_output\030\003 \001(\0132;.goo" + + "gle.cloud.documentai.v1.Document.EntityValidationOutputB\010\n" + "\006sourceB\313\001\n" + "\036com.google.cloud.documentai.v1B\r" - + "DocumentProtoP\001Z>cloud.google.com/go/docu" - + "mentai/apiv1/documentaipb;documentaipb\252\002" - + "\032Google.Cloud.DocumentAI.V1\312\002\032Google\\Clo" - + "ud\\DocumentAI\\V1\352\002\035Google::Cloud::DocumentAI::V1b\006proto3" + + "DocumentProtoP\001Z>cloud.google.com/go/documentai/apiv1/docu" + + "mentaipb;documentaipb\252\002\032Google.Cloud.Doc" + + "umentAI.V1\312\002\032Google\\Cloud\\DocumentAI\\V1\352" + + "\002\035Google::Cloud::DocumentAI::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.cloud.documentai.v1.BarcodeProto.getDescriptor(), com.google.cloud.documentai.v1.GeometryProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -723,6 +791,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Revisions", "DocumentLayout", "ChunkedDocument", + "BlobAssets", "EntityValidationOutput", "EntitiesRevisions", "EntitiesRevisionId", @@ -1088,8 +1157,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TextAnchor", "ChangedText", "Provenance", }); - internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor = + internal_static_google_cloud_documentai_v1_Document_Annotations_descriptor = internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(10); + internal_static_google_cloud_documentai_v1_Document_Annotations_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_Document_Annotations_descriptor, + new java.lang.String[] { + "Description", + }); + internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor = + internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(11); internal_static_google_cloud_documentai_v1_Document_DocumentLayout_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_DocumentLayout_descriptor, @@ -1103,7 +1180,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor, new java.lang.String[] { - "TextBlock", "TableBlock", "ListBlock", "BlockId", "PageSpan", "BoundingBox", "Block", + "TextBlock", + "TableBlock", + "ListBlock", + "ImageBlock", + "BlockId", + "PageSpan", + "BoundingBox", + "Block", }); internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_descriptor = internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor @@ -1121,7 +1205,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_descriptor, new java.lang.String[] { - "Text", "Type", "Blocks", + "Text", "Type", "Blocks", "Annotations", }); internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_descriptor = internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor @@ -1130,7 +1214,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_descriptor, new java.lang.String[] { - "HeaderRows", "BodyRows", "Caption", + "HeaderRows", "BodyRows", "Caption", "Annotations", }); internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_descriptor = internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor @@ -1168,8 +1252,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Blocks", }); + internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_descriptor = + internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_descriptor + .getNestedType(7); + internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_Document_DocumentLayout_DocumentLayoutBlock_LayoutImageBlock_descriptor, + new java.lang.String[] { + "BlobAssetId", + "GcsUri", + "DataUri", + "MimeType", + "ImageText", + "Annotations", + "ImageSource", + }); internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor = - internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(11); + internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(12); internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_descriptor, @@ -1183,7 +1282,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor, new java.lang.String[] { - "ChunkId", "SourceBlockIds", "Content", "PageSpan", "PageHeaders", "PageFooters", + "ChunkId", + "SourceBlockIds", + "Content", + "PageSpan", + "PageHeaders", + "PageFooters", + "ChunkFields", }); internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor = internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor @@ -1212,8 +1317,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Text", "PageSpan", }); + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_descriptor = + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor + .getNestedType(3); + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ImageChunkField_descriptor, + new java.lang.String[] { + "BlobAssetId", "GcsUri", "DataUri", "Annotations", "ImageSource", + }); + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_descriptor = + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor + .getNestedType(4); + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_TableChunkField_descriptor, + new java.lang.String[] { + "Annotations", + }); + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_descriptor = + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_descriptor + .getNestedType(5); + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_Document_ChunkedDocument_Chunk_ChunkField_descriptor, + new java.lang.String[] { + "ImageChunkField", "TableChunkField", "FieldType", + }); + internal_static_google_cloud_documentai_v1_Document_BlobAsset_descriptor = + internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(13); + internal_static_google_cloud_documentai_v1_Document_BlobAsset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_documentai_v1_Document_BlobAsset_descriptor, + new java.lang.String[] { + "AssetId", "Content", "MimeType", + }); internal_static_google_cloud_documentai_v1_Document_EntityValidationOutput_descriptor = - internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(12); + internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(14); internal_static_google_cloud_documentai_v1_Document_EntityValidationOutput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_EntityValidationOutput_descriptor, @@ -1230,7 +1370,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RuleName", "RuleDescription", "ValidationResultType", "ValidationDetails", }); internal_static_google_cloud_documentai_v1_Document_EntitiesRevision_descriptor = - internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(13); + internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedType(15); internal_static_google_cloud_documentai_v1_Document_EntitiesRevision_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_documentai_v1_Document_EntitiesRevision_descriptor, @@ -1239,6 +1379,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.cloud.documentai.v1.BarcodeProto.getDescriptor(); com.google.cloud.documentai.v1.GeometryProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto index 1eaad2a3c541..eed6c35b2381 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/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. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.documentai.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/documentai/v1/barcode.proto"; import "google/cloud/documentai/v1/geometry.proto"; import "google/protobuf/timestamp.proto"; @@ -180,9 +181,9 @@ message Document { // Confidence of the current // [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - // context of the object this layout is for. e.g. confidence can be for a - // single token, a table, a visual element, etc. depending on context. - // Range `[0, 1]`. + // context of the object this layout is for. For example, confidence can + // be for a single token, a table, a visual element, etc. depending on + // context. Range `[0, 1]`. float confidence = 2; // The bounding polygon for the @@ -340,8 +341,8 @@ message Document { repeated DetectedLanguage detected_languages = 2; } - // Detected non-text visual elements e.g. checkbox, signature etc. on the - // page. + // Detected non-text visual elements, for example, checkbox, signature etc. + // on the page. message VisualElement { // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for // [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. @@ -400,7 +401,7 @@ message Document { message FormField { // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the // [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - // e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + // For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. Layout field_name = 1; // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the @@ -526,7 +527,7 @@ message Document { // A list of visually detected tokens on the page. repeated Token tokens = 8; - // A list of detected non-text visual elements e.g. checkbox, + // A list of detected non-text visual elements, for example, checkbox, // signature etc. on the page. repeated VisualElement visual_elements = 9; @@ -586,6 +587,8 @@ message Document { // Float value. float float_value = 8; + // A signature - a graphical representation of a person's name, + // often used to sign a document. bool signature_value = 10; } @@ -622,10 +625,11 @@ message Document { // [Document.text][google.cloud.documentai.v1.Document.text]. TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL]; - // Required. Entity type from a schema e.g. `Address`. + // Required. Entity type from a schema, for example, `Address`. string type = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. + // Optional. Text value of the entity, for example, `1600 Amphitheatre + // Pkwy`. string mention_text = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Deprecated. Use `id` field instead. @@ -643,9 +647,9 @@ message Document { string id = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Normalized entity value. Absent if the extracted value could - // not be converted or the type (e.g. address) is not supported for certain - // parsers. This field is also only populated for certain supported document - // types. + // not be converted or the type (for example, address) is not supported for + // certain parsers. This field is also only populated for certain supported + // document types. NormalizedValue normalized_value = 9 [(google.api.field_behavior) = OPTIONAL]; @@ -854,7 +858,7 @@ message Document { message Revision { // Human Review information of the document. message HumanReview { - // Human review state. e.g. `requested`, `succeeded`, `rejected`. + // Human review state. For example, `requested`, `succeeded`, `rejected`. string state = 1; // A message providing more details about the current state of processing. @@ -912,6 +916,12 @@ message Document { repeated Provenance provenance = 3 [deprecated = true]; } + // Represents the annotation of a block or a chunk. + message Annotations { + // The description of the content with this annotation. + string description = 1; + } + // Represents the parsed layout of a document as a collection of blocks that // the document is divided into. message DocumentLayout { @@ -940,6 +950,9 @@ message Document { // A text block could further have child blocks. // Repeated blocks support further hierarchies and nested blocks. repeated DocumentLayoutBlock blocks = 3; + + // Annotation of the text block. + Annotations annotations = 4; } // Represents a table type block. @@ -952,6 +965,9 @@ message Document { // Table caption/title. string caption = 3; + + // Annotation of the table block. + Annotations annotations = 4; } // Represents a row in a table. @@ -990,6 +1006,37 @@ message Document { repeated DocumentLayoutBlock blocks = 1; } + // Represents an image type block. + message LayoutImageBlock { + // Source of the image. + oneof image_source { + // Optional. Asset id of the inline image. If set, find the image + // content in the blob_assets field. + string blob_asset_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Google Cloud Storage uri of the image. + string gcs_uri = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data uri of the image. + // It is 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], + string data_uri = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Mime type of the image. An IANA published [media type (MIME type)] + // (https://www.iana.org/assignments/media-types/media-types.xhtml). + string mime_type = 1; + + // Text extracted from the image using OCR or alt text describing the + // image. + string image_text = 2; + + // Annotation of the image block. + Annotations annotations = 3; + } + oneof block { // Block consisting of text content. LayoutTextBlock text_block = 2; @@ -999,6 +1046,9 @@ message Document { // Block consisting of list content/structure. LayoutListBlock list_block = 4; + + // Block consisting of image content. + LayoutImageBlock image_block = 7; } // ID of the block. @@ -1046,6 +1096,48 @@ message Document { ChunkPageSpan page_span = 2; } + // The image chunk field in the chunk. + message ImageChunkField { + // Source of the image. + oneof image_source { + // Optional. Asset id of the inline image. If set, find the image + // content in the blob_assets field. + string blob_asset_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Google Cloud Storage uri of the image. + string gcs_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data uri of the image. + // It is 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], + string data_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Annotation of the image chunk field. + Annotations annotations = 4; + } + + // The table chunk field in the chunk. + message TableChunkField { + // Annotation of the table chunk field. + Annotations annotations = 1; + } + + // The chunk field in the chunk. A chunk field could be one of the various + // types (for example, image, table) supported. + message ChunkField { + // The type of the chunk field. + oneof field_type { + // The image chunk field in the chunk. + ImageChunkField image_chunk_field = 1; + + // The table chunk field in the chunk. + TableChunkField table_chunk_field = 2; + } + } + // ID of the chunk. string chunk_id = 1; @@ -1063,12 +1155,31 @@ message Document { // Page footers associated with the chunk. repeated ChunkPageFooter page_footers = 6; + + // Chunk fields inside this chunk. + repeated ChunkField chunk_fields = 7; } // List of chunks. repeated Chunk chunks = 1; } + // Represents a blob asset. It's used to store the content of the inline blob + // in this document, for example, image bytes, such that it can be referenced + // by other fields in the document via asset ID. + message BlobAsset { + // Optional. The id of the blob asset. + string asset_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The content of the blob asset, for example, image bytes. + bytes content = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The mime type of the blob asset. + // An IANA published [media type (MIME + // type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + string mime_type = 3; + } + // The output of the validation given the document and the validation rules. message EntityValidationOutput { // Validation result for a single validation rule. @@ -1186,6 +1297,12 @@ message Document { // Document chunked based on chunking config. ChunkedDocument chunked_document = 18; + // Optional. The blob assets in this document. This is used to store the + // content of the inline blobs in this document, for example, image bytes, + // such that it can be referenced by other fields in the document via asset + // id. + repeated BlobAsset blob_assets = 19 [(google.api.field_behavior) = OPTIONAL]; + // The entity validation output for the document. This is the validation // output for `document.entities` field. EntityValidationOutput entity_validation_output = 21; @@ -1198,7 +1315,7 @@ message Document { // The entity revision ID that `document.entities` field is based on. // If this field is set and `entities_revisions` is not empty, the entities in // `document.entities` field are the entities in the entity revision with this - // ID and `document.entity_validation_output` field is the + // id and `document.entity_validation_output` field is the // `entity_validation_output` field in this entity revision. string entities_revision_id = 23; } diff --git a/java-spanner/README.md b/java-spanner/README.md index acf710386a2e..03914f98ef10 100644 --- a/java-spanner/README.md +++ b/java-spanner/README.md @@ -381,6 +381,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-java/ | List Databases Sample | [source code](https://github.com/googleapis/google-cloud-java/blob/main/samples/snippets/src/main/java/com/example/spanner/ListDatabasesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-java&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListDatabasesSample.java) | | List Instance Config Operations Sample | [source code](https://github.com/googleapis/google-cloud-java/blob/main/samples/snippets/src/main/java/com/example/spanner/ListInstanceConfigOperationsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-java&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListInstanceConfigOperationsSample.java) | | List Instance Configs Sample | [source code](https://github.com/googleapis/google-cloud-java/blob/main/samples/snippets/src/main/java/com/example/spanner/ListInstanceConfigsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-java&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListInstanceConfigsSample.java) | +| Mutable Credentials Example | [source code](https://github.com/googleapis/google-cloud-java/blob/main/samples/snippets/src/main/java/com/example/spanner/MutableCredentialsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-java&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/MutableCredentialsExample.java) | | Pg Alter Sequence Sample | [source code](https://github.com/googleapis/google-cloud-java/blob/main/samples/snippets/src/main/java/com/example/spanner/PgAlterSequenceSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-java&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/PgAlterSequenceSample.java) | | Pg Async Query To List Async Example | [source code](https://github.com/googleapis/google-cloud-java/blob/main/samples/snippets/src/main/java/com/example/spanner/PgAsyncQueryToListAsyncExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-java&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/PgAsyncQueryToListAsyncExample.java) | | Pg Async Runner Example | [source code](https://github.com/googleapis/google-cloud-java/blob/main/samples/snippets/src/main/java/com/example/spanner/PgAsyncRunnerExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-java&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/PgAsyncRunnerExample.java) | diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/resources/META-INF/native-image/com.google.cloud.texttospeech.v1/reflect-config.json b/java-texttospeech/google-cloud-texttospeech/src/main/resources/META-INF/native-image/com.google.cloud.texttospeech.v1/reflect-config.json index 736a5db6b31c..cda6534f695c 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/resources/META-INF/native-image/com.google.cloud.texttospeech.v1/reflect-config.json +++ b/java-texttospeech/google-cloud-texttospeech/src/main/resources/META-INF/native-image/com.google.cloud.texttospeech.v1/reflect-config.json @@ -494,6 +494,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.texttospeech.v1.AdvancedVoiceOptions$HarmBlockThreshold", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1.AdvancedVoiceOptions$HarmCategory", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1.AdvancedVoiceOptions$SafetySetting", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1.AdvancedVoiceOptions$SafetySetting$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1.AdvancedVoiceOptions$SafetySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1.AdvancedVoiceOptions$SafetySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.texttospeech.v1.AudioConfig", "queryAllDeclaredConstructors": true, diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/resources/META-INF/native-image/com.google.cloud.texttospeech.v1beta1/reflect-config.json b/java-texttospeech/google-cloud-texttospeech/src/main/resources/META-INF/native-image/com.google.cloud.texttospeech.v1beta1/reflect-config.json index a23c39a0a4ad..18a620da09f5 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/resources/META-INF/native-image/com.google.cloud.texttospeech.v1beta1/reflect-config.json +++ b/java-texttospeech/google-cloud-texttospeech/src/main/resources/META-INF/native-image/com.google.cloud.texttospeech.v1beta1/reflect-config.json @@ -494,6 +494,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions$HarmBlockThreshold", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions$HarmCategory", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions$SafetySetting", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions$SafetySetting$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions$SafetySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions$SafetySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.texttospeech.v1beta1.AudioConfig", "queryAllDeclaredConstructors": true, diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptions.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptions.java index 42363545de35..eae63f942d84 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptions.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptions.java @@ -68,6 +68,2327 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.Builder.class); } + /** + * + * + *
+   * Harm categories that will block the content.
+   * 
+ * + * Protobuf enum {@code google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory} + */ + public enum HarmCategory implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * HARM_CATEGORY_UNSPECIFIED = 0; + */ + HARM_CATEGORY_UNSPECIFIED(0), + /** + * + * + *
+     * Content that promotes violence or incites hatred against individuals or
+     * groups based on certain attributes.
+     * 
+ * + * HARM_CATEGORY_HATE_SPEECH = 1; + */ + HARM_CATEGORY_HATE_SPEECH(1), + /** + * + * + *
+     * Content that promotes, facilitates, or enables dangerous activities.
+     * 
+ * + * HARM_CATEGORY_DANGEROUS_CONTENT = 2; + */ + HARM_CATEGORY_DANGEROUS_CONTENT(2), + /** + * + * + *
+     * Abusive, threatening, or content intended to bully, torment, or ridicule.
+     * 
+ * + * HARM_CATEGORY_HARASSMENT = 3; + */ + HARM_CATEGORY_HARASSMENT(3), + /** + * + * + *
+     * Content that contains sexually explicit material.
+     * 
+ * + * HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + */ + HARM_CATEGORY_SEXUALLY_EXPLICIT(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HarmCategory"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * HARM_CATEGORY_UNSPECIFIED = 0; + */ + public static final int HARM_CATEGORY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Content that promotes violence or incites hatred against individuals or
+     * groups based on certain attributes.
+     * 
+ * + * HARM_CATEGORY_HATE_SPEECH = 1; + */ + public static final int HARM_CATEGORY_HATE_SPEECH_VALUE = 1; + + /** + * + * + *
+     * Content that promotes, facilitates, or enables dangerous activities.
+     * 
+ * + * HARM_CATEGORY_DANGEROUS_CONTENT = 2; + */ + public static final int HARM_CATEGORY_DANGEROUS_CONTENT_VALUE = 2; + + /** + * + * + *
+     * Abusive, threatening, or content intended to bully, torment, or ridicule.
+     * 
+ * + * HARM_CATEGORY_HARASSMENT = 3; + */ + public static final int HARM_CATEGORY_HARASSMENT_VALUE = 3; + + /** + * + * + *
+     * Content that contains sexually explicit material.
+     * 
+ * + * HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + */ + public static final int HARM_CATEGORY_SEXUALLY_EXPLICIT_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 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; + 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.texttospeech.v1.AdvancedVoiceOptions.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.texttospeech.v1.AdvancedVoiceOptions.HarmCategory) + } + + /** + * + * + *
+   * Harm block thresholds for the safety settings.
+   * 
+ * + * Protobuf enum {@code google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold} + */ + public enum HarmBlockThreshold implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The harm block threshold is unspecified.
+     * 
+ * + * HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + */ + HARM_BLOCK_THRESHOLD_UNSPECIFIED(0), + /** + * + * + *
+     * Block content with a low harm probability or higher.
+     * 
+ * + * BLOCK_LOW_AND_ABOVE = 1; + */ + BLOCK_LOW_AND_ABOVE(1), + /** + * + * + *
+     * Block content with a medium harm probability or higher.
+     * 
+ * + * BLOCK_MEDIUM_AND_ABOVE = 2; + */ + BLOCK_MEDIUM_AND_ABOVE(2), + /** + * + * + *
+     * Block content with a high harm probability.
+     * 
+ * + * BLOCK_ONLY_HIGH = 3; + */ + BLOCK_ONLY_HIGH(3), + /** + * + * + *
+     * Do not block any content, regardless of its harm probability.
+     * 
+ * + * BLOCK_NONE = 4; + */ + BLOCK_NONE(4), + /** + * + * + *
+     * Turn off the safety filter entirely.
+     * 
+ * + * OFF = 5; + */ + OFF(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HarmBlockThreshold"); + } + + /** + * + * + *
+     * The harm block threshold is unspecified.
+     * 
+ * + * HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + */ + public static final int HARM_BLOCK_THRESHOLD_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Block content with a low harm probability or higher.
+     * 
+ * + * BLOCK_LOW_AND_ABOVE = 1; + */ + public static final int BLOCK_LOW_AND_ABOVE_VALUE = 1; + + /** + * + * + *
+     * Block content with a medium harm probability or higher.
+     * 
+ * + * BLOCK_MEDIUM_AND_ABOVE = 2; + */ + public static final int BLOCK_MEDIUM_AND_ABOVE_VALUE = 2; + + /** + * + * + *
+     * Block content with a high harm probability.
+     * 
+ * + * BLOCK_ONLY_HIGH = 3; + */ + public static final int BLOCK_ONLY_HIGH_VALUE = 3; + + /** + * + * + *
+     * Do not block any content, regardless of its harm probability.
+     * 
+ * + * BLOCK_NONE = 4; + */ + public static final int BLOCK_NONE_VALUE = 4; + + /** + * + * + *
+     * Turn off the safety filter entirely.
+     * 
+ * + * OFF = 5; + */ + public static final int OFF_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 HarmBlockThreshold 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 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.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + 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 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.texttospeech.v1.AdvancedVoiceOptions.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final HarmBlockThreshold[] VALUES = values(); + + 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()]; + } + + private final int value; + + private HarmBlockThreshold(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold) + } + + public interface SafetySettingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The harm category to apply the safety setting to.
+     * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @return The enum numeric value on the wire for category. + */ + int getCategoryValue(); + + /** + * + * + *
+     * The harm category to apply the safety setting to.
+     * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @return The category. + */ + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory getCategory(); + + /** + * + * + *
+     * The harm block threshold for the safety setting.
+     * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The enum numeric value on the wire for threshold. + */ + int getThresholdValue(); + + /** + * + * + *
+     * The harm block threshold for the safety setting.
+     * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The threshold. + */ + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold getThreshold(); + } + + /** + * + * + *
+   * Safety setting for a single harm category.
+   * 
+ * + * Protobuf type {@code google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting} + */ + public static final class SafetySetting extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting) + SafetySettingOrBuilder { + 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= */ "", + "SafetySetting"); + } + + // Use SafetySetting.newBuilder() to construct. + private SafetySetting(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SafetySetting() { + category_ = 0; + threshold_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.class, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder.class); + } + + public static final int CATEGORY_FIELD_NUMBER = 1; + private int category_ = 0; + + /** + * + * + *
+     * The harm category to apply the safety setting to.
+     * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + + /** + * + * + *
+     * The harm category to apply the safety setting to.
+     * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory getCategory() { + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory result = + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory.forNumber(category_); + return result == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory.UNRECOGNIZED + : result; + } + + public static final int THRESHOLD_FIELD_NUMBER = 2; + private int threshold_ = 0; + + /** + * + * + *
+     * The harm block threshold for the safety setting.
+     * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The enum numeric value on the wire for threshold. + */ + @java.lang.Override + public int getThresholdValue() { + return threshold_; + } + + /** + * + * + *
+     * The harm block threshold for the safety setting.
+     * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The threshold. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold getThreshold() { + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold result = + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold.forNumber( + threshold_); + return result == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold.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 (category_ + != com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory + .HARM_CATEGORY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, category_); + } + if (threshold_ + != com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold + .HARM_BLOCK_THRESHOLD_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, threshold_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (category_ + != com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory + .HARM_CATEGORY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, category_); + } + if (threshold_ + != com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.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 boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting)) { + return super.equals(obj); + } + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting other = + (com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.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 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) + THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + threshold_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting 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.texttospeech.v1.AdvancedVoiceOptions.SafetySetting parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting 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.texttospeech.v1.AdvancedVoiceOptions.SafetySetting parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting 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.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + 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.texttospeech.v1.AdvancedVoiceOptions.SafetySetting parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting 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.texttospeech.v1.AdvancedVoiceOptions.SafetySetting 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 setting for a single harm category.
+     * 
+ * + * Protobuf type {@code google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting) + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.class, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder.class); + } + + // Construct using + // com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.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; + threshold_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_descriptor; + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + getDefaultInstanceForType() { + return com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting build() { + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting buildPartial() { + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting result = + new com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.category_ = category_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.threshold_ = threshold_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting) { + return mergeFrom( + (com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting other) { + if (other + == com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.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; + } + + @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: + { + 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; + } + + private int bitField0_; + + private int category_ = 0; + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @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; + } + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory getCategory() { + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory result = + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory.forNumber(category_); + return result == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + category_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + bitField0_ = (bitField0_ & ~0x00000001); + category_ = 0; + onChanged(); + return this; + } + + private int threshold_ = 0; + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The enum numeric value on the wire for threshold. + */ + @java.lang.Override + public int getThresholdValue() { + return threshold_; + } + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @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; + } + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The threshold. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold + getThreshold() { + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold result = + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold.forNumber( + threshold_); + return result == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @param value The threshold to set. + * @return This builder for chaining. + */ + public Builder setThreshold( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + threshold_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearThreshold() { + bitField0_ = (bitField0_ & ~0x00000002); + threshold_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting) + } + + // @@protoc_insertion_point(class_scope:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting) + private static final com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting(); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + 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(); + } + }; + + 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.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SafetySettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + java.util.List + getSettingsList(); + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting getSettings(int index); + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + int getSettingsCount(); + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + java.util.List< + ? extends com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder> + getSettingsOrBuilderList(); + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder + getSettingsOrBuilder(int index); + } + + /** + * + * + *
+   * Safety settings for the request.
+   * 
+ * + * Protobuf type {@code google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings} + */ + public static final class SafetySettings extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings) + SafetySettingsOrBuilder { + 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= */ "", + "SafetySettings"); + } + + // Use SafetySettings.newBuilder() to construct. + private SafetySettings(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SafetySettings() { + settings_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.class, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.Builder.class); + } + + public static final int SETTINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + settings_; + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public java.util.List + getSettingsList() { + return settings_; + } + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder> + getSettingsOrBuilderList() { + return settings_; + } + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public int getSettingsCount() { + return settings_.size(); + } + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting getSettings( + int index) { + return settings_.get(index); + } + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder + getSettingsOrBuilder(int index) { + return settings_.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 < settings_.size(); i++) { + output.writeMessage(1, settings_.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 < settings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, settings_.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.texttospeech.v1.AdvancedVoiceOptions.SafetySettings)) { + return super.equals(obj); + } + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings other = + (com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings) obj; + + if (!getSettingsList().equals(other.getSettingsList())) 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 (getSettingsCount() > 0) { + hash = (37 * hash) + SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSettingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings 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.texttospeech.v1.AdvancedVoiceOptions.SafetySettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings 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.texttospeech.v1.AdvancedVoiceOptions.SafetySettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings 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.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + 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.texttospeech.v1.AdvancedVoiceOptions.SafetySettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings 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.texttospeech.v1.AdvancedVoiceOptions.SafetySettings 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 settings for the request.
+     * 
+ * + * Protobuf type {@code google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings) + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.class, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.Builder.class); + } + + // Construct using + // com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (settingsBuilder_ == null) { + settings_ = java.util.Collections.emptyList(); + } else { + settings_ = null; + settingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.texttospeech.v1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + getDefaultInstanceForType() { + return com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings build() { + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings buildPartial() { + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings result = + new com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings result) { + if (settingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + settings_ = java.util.Collections.unmodifiableList(settings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.settings_ = settings_; + } else { + result.settings_ = settingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings) { + return mergeFrom( + (com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings other) { + if (other + == com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance()) return this; + if (settingsBuilder_ == null) { + if (!other.settings_.isEmpty()) { + if (settings_.isEmpty()) { + settings_ = other.settings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSettingsIsMutable(); + settings_.addAll(other.settings_); + } + onChanged(); + } + } else { + if (!other.settings_.isEmpty()) { + if (settingsBuilder_.isEmpty()) { + settingsBuilder_.dispose(); + settingsBuilder_ = null; + settings_ = other.settings_; + bitField0_ = (bitField0_ & ~0x00000001); + settingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSettingsFieldBuilder() + : null; + } else { + settingsBuilder_.addAllMessages(other.settings_); + } + } + } + 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.texttospeech.v1.AdvancedVoiceOptions.SafetySetting m = + input.readMessage( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + .parser(), + extensionRegistry); + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.add(m); + } else { + settingsBuilder_.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 + settings_ = java.util.Collections.emptyList(); + + private void ensureSettingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + settings_ = + new java.util.ArrayList< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting>(settings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder> + settingsBuilder_; + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public java.util.List + getSettingsList() { + if (settingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(settings_); + } else { + return settingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public int getSettingsCount() { + if (settingsBuilder_ == null) { + return settings_.size(); + } else { + return settingsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting getSettings( + int index) { + if (settingsBuilder_ == null) { + return settings_.get(index); + } else { + return settingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder setSettings( + int index, com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSettingsIsMutable(); + settings_.set(index, value); + onChanged(); + } else { + settingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder setSettings( + int index, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder + builderForValue) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.set(index, builderForValue.build()); + onChanged(); + } else { + settingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addSettings( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSettingsIsMutable(); + settings_.add(value); + onChanged(); + } else { + settingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addSettings( + int index, com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSettingsIsMutable(); + settings_.add(index, value); + onChanged(); + } else { + settingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addSettings( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder + builderForValue) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.add(builderForValue.build()); + onChanged(); + } else { + settingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addSettings( + int index, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder + builderForValue) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.add(index, builderForValue.build()); + onChanged(); + } else { + settingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addAllSettings( + java.lang.Iterable< + ? extends com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting> + values) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, settings_); + onChanged(); + } else { + settingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder clearSettings() { + if (settingsBuilder_ == null) { + settings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + settingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder removeSettings(int index) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.remove(index); + onChanged(); + } else { + settingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder + getSettingsBuilder(int index) { + return internalGetSettingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder + getSettingsOrBuilder(int index) { + if (settingsBuilder_ == null) { + return settings_.get(index); + } else { + return settingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder> + getSettingsOrBuilderList() { + if (settingsBuilder_ != null) { + return settingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(settings_); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder + addSettingsBuilder() { + return internalGetSettingsFieldBuilder() + .addBuilder( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + .getDefaultInstance()); + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder + addSettingsBuilder(int index) { + return internalGetSettingsFieldBuilder() + .addBuilder( + index, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting + .getDefaultInstance()); + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public java.util.List< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder> + getSettingsBuilderList() { + return internalGetSettingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder> + internalGetSettingsFieldBuilder() { + if (settingsBuilder_ == null) { + settingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySetting.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingOrBuilder>( + settings_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + settings_ = null; + } + return settingsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings) + private static final com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings(); + } + + public static com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetySettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int LOW_LATENCY_JOURNEY_SYNTHESIS_FIELD_NUMBER = 1; private boolean lowLatencyJourneySynthesis_ = false; @@ -76,58 +2397,165 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Only for Journey voices. If false, the synthesis is context aware
-   * and has a higher latency.
+   * Only for Journey voices. If false, the synthesis is context aware
+   * and has a higher latency.
+   * 
+ * + * optional bool low_latency_journey_synthesis = 1; + * + * @return Whether the lowLatencyJourneySynthesis field is set. + */ + @java.lang.Override + public boolean hasLowLatencyJourneySynthesis() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Only for Journey voices. If false, the synthesis is context aware
+   * and has a higher latency.
+   * 
+ * + * optional bool low_latency_journey_synthesis = 1; + * + * @return The lowLatencyJourneySynthesis. + */ + @java.lang.Override + public boolean getLowLatencyJourneySynthesis() { + return lowLatencyJourneySynthesis_; + } + + public static final int RELAX_SAFETY_FILTERS_FIELD_NUMBER = 8; + private boolean relaxSafetyFilters_ = false; + + /** + * + * + *
+   * Optional. Input only. Deprecated, use safety_settings instead.
+   * If true, relaxes safety filters for Gemini TTS.
    * 
* - * optional bool low_latency_journey_synthesis = 1; + * + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * * - * @return Whether the lowLatencyJourneySynthesis field is set. + * @deprecated google.cloud.texttospeech.v1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1/cloud_tts.proto;l=224 + * @return The relaxSafetyFilters. */ @java.lang.Override - public boolean hasLowLatencyJourneySynthesis() { - return ((bitField0_ & 0x00000001) != 0); + @java.lang.Deprecated + public boolean getRelaxSafetyFilters() { + return relaxSafetyFilters_; } + public static final int SAFETY_SETTINGS_FIELD_NUMBER = 9; + private com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safetySettings_; + /** * * *
-   * Only for Journey voices. If false, the synthesis is context aware
-   * and has a higher latency.
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
    * 
* - * optional bool low_latency_journey_synthesis = 1; + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * * - * @return The lowLatencyJourneySynthesis. + * @return Whether the safetySettings field is set. */ @java.lang.Override - public boolean getLowLatencyJourneySynthesis() { - return lowLatencyJourneySynthesis_; + public boolean hasSafetySettings() { + return ((bitField0_ & 0x00000002) != 0); } - public static final int RELAX_SAFETY_FILTERS_FIELD_NUMBER = 8; - private boolean relaxSafetyFilters_ = false; + /** + * + * + *
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
+   * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The safetySettings. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings getSafetySettings() { + return safetySettings_ == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.getDefaultInstance() + : safetySettings_; + } /** * * *
-   * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-   * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-   * Otherwise, will return result
-   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
    * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingsOrBuilder + getSafetySettingsOrBuilder() { + return safetySettings_ == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.getDefaultInstance() + : safetySettings_; + } + + public static final int ENABLE_TEXTNORM_FIELD_NUMBER = 2; + private boolean enableTextnorm_ = false; + + /** * - * @return The relaxSafetyFilters. + * + *
+   * Optional. If true, textnorm will be applied to text input. This feature is
+   * enabled by default. Only applies for Gemini TTS.
+   * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableTextnorm field is set. */ @java.lang.Override - public boolean getRelaxSafetyFilters() { - return relaxSafetyFilters_; + public boolean hasEnableTextnorm() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. If true, textnorm will be applied to text input. This feature is
+   * enabled by default. Only applies for Gemini TTS.
+   * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTextnorm. + */ + @java.lang.Override + public boolean getEnableTextnorm() { + return enableTextnorm_; } private byte memoizedIsInitialized = -1; @@ -147,9 +2575,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(1, lowLatencyJourneySynthesis_); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(2, enableTextnorm_); + } if (relaxSafetyFilters_ != false) { output.writeBool(8, relaxSafetyFilters_); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getSafetySettings()); + } getUnknownFields().writeTo(output); } @@ -162,9 +2596,15 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, lowLatencyJourneySynthesis_); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableTextnorm_); + } if (relaxSafetyFilters_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, relaxSafetyFilters_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSafetySettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -186,6 +2626,14 @@ public boolean equals(final java.lang.Object obj) { if (getLowLatencyJourneySynthesis() != other.getLowLatencyJourneySynthesis()) return false; } if (getRelaxSafetyFilters() != other.getRelaxSafetyFilters()) return false; + if (hasSafetySettings() != other.hasSafetySettings()) return false; + if (hasSafetySettings()) { + if (!getSafetySettings().equals(other.getSafetySettings())) return false; + } + if (hasEnableTextnorm() != other.hasEnableTextnorm()) return false; + if (hasEnableTextnorm()) { + if (getEnableTextnorm() != other.getEnableTextnorm()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -204,6 +2652,14 @@ public int hashCode() { } hash = (37 * hash) + RELAX_SAFETY_FILTERS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRelaxSafetyFilters()); + if (hasSafetySettings()) { + hash = (37 * hash) + SAFETY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSafetySettings().hashCode(); + } + if (hasEnableTextnorm()) { + hash = (37 * hash) + ENABLE_TEXTNORM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableTextnorm()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -335,10 +2791,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.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) { + internalGetSafetySettingsFieldBuilder(); + } } @java.lang.Override @@ -347,6 +2812,12 @@ public Builder clear() { bitField0_ = 0; lowLatencyJourneySynthesis_ = false; relaxSafetyFilters_ = false; + safetySettings_ = null; + if (safetySettingsBuilder_ != null) { + safetySettingsBuilder_.dispose(); + safetySettingsBuilder_ = null; + } + enableTextnorm_ = false; return this; } @@ -391,6 +2862,15 @@ private void buildPartial0(com.google.cloud.texttospeech.v1.AdvancedVoiceOptions if (((from_bitField0_ & 0x00000002) != 0)) { result.relaxSafetyFilters_ = relaxSafetyFilters_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.safetySettings_ = + safetySettingsBuilder_ == null ? safetySettings_ : safetySettingsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.enableTextnorm_ = enableTextnorm_; + to_bitField0_ |= 0x00000004; + } result.bitField0_ |= to_bitField0_; } @@ -413,6 +2893,12 @@ public Builder mergeFrom(com.google.cloud.texttospeech.v1.AdvancedVoiceOptions o if (other.getRelaxSafetyFilters() != false) { setRelaxSafetyFilters(other.getRelaxSafetyFilters()); } + if (other.hasSafetySettings()) { + mergeSafetySettings(other.getSafetySettings()); + } + if (other.hasEnableTextnorm()) { + setEnableTextnorm(other.getEnableTextnorm()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -445,12 +2931,25 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 16: + { + enableTextnorm_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 16 case 64: { relaxSafetyFilters_ = input.readBool(); bitField0_ |= 0x00000002; break; } // case 64 + case 74: + { + input.readMessage( + internalGetSafetySettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -552,19 +3051,20 @@ public Builder clearLowLatencyJourneySynthesis() { * * *
-     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-     * Otherwise, will return result
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * Optional. Input only. Deprecated, use safety_settings instead.
+     * If true, relaxes safety filters for Gemini TTS.
      * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.texttospeech.v1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1/cloud_tts.proto;l=224 * @return The relaxSafetyFilters. */ @java.lang.Override + @java.lang.Deprecated public boolean getRelaxSafetyFilters() { return relaxSafetyFilters_; } @@ -573,19 +3073,20 @@ public boolean getRelaxSafetyFilters() { * * *
-     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-     * Otherwise, will return result
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * Optional. Input only. Deprecated, use safety_settings instead.
+     * If true, relaxes safety filters for Gemini TTS.
      * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.texttospeech.v1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1/cloud_tts.proto;l=224 * @param value The relaxSafetyFilters to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setRelaxSafetyFilters(boolean value) { relaxSafetyFilters_ = value; @@ -598,18 +3099,19 @@ public Builder setRelaxSafetyFilters(boolean value) { * * *
-     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-     * Otherwise, will return result
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * Optional. Input only. Deprecated, use safety_settings instead.
+     * If true, relaxes safety filters for Gemini TTS.
      * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.texttospeech.v1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1/cloud_tts.proto;l=224 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearRelaxSafetyFilters() { bitField0_ = (bitField0_ & ~0x00000002); relaxSafetyFilters_ = false; @@ -617,6 +3119,332 @@ public Builder clearRelaxSafetyFilters() { return this; } + private com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safetySettings_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingsOrBuilder> + safetySettingsBuilder_; + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the safetySettings field is set. + */ + public boolean hasSafetySettings() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The safetySettings. + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + getSafetySettings() { + if (safetySettingsBuilder_ == null) { + return safetySettings_ == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance() + : safetySettings_; + } else { + return safetySettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSafetySettings( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings value) { + if (safetySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safetySettings_ = value; + } else { + safetySettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSafetySettings( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.Builder + builderForValue) { + if (safetySettingsBuilder_ == null) { + safetySettings_ = builderForValue.build(); + } else { + safetySettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSafetySettings( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings value) { + if (safetySettingsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && safetySettings_ != null + && safetySettings_ + != com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance()) { + getSafetySettingsBuilder().mergeFrom(value); + } else { + safetySettings_ = value; + } + } else { + safetySettingsBuilder_.mergeFrom(value); + } + if (safetySettings_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSafetySettings() { + bitField0_ = (bitField0_ & ~0x00000004); + safetySettings_ = null; + if (safetySettingsBuilder_ != null) { + safetySettingsBuilder_.dispose(); + safetySettingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.Builder + getSafetySettingsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetSafetySettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingsOrBuilder + getSafetySettingsOrBuilder() { + if (safetySettingsBuilder_ != null) { + return safetySettingsBuilder_.getMessageOrBuilder(); + } else { + return safetySettings_ == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance() + : safetySettings_; + } + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingsOrBuilder> + internalGetSafetySettingsFieldBuilder() { + if (safetySettingsBuilder_ == null) { + safetySettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingsOrBuilder>( + getSafetySettings(), getParentForChildren(), isClean()); + safetySettings_ = null; + } + return safetySettingsBuilder_; + } + + private boolean enableTextnorm_; + + /** + * + * + *
+     * Optional. If true, textnorm will be applied to text input. This feature is
+     * enabled by default. Only applies for Gemini TTS.
+     * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableTextnorm field is set. + */ + @java.lang.Override + public boolean hasEnableTextnorm() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. If true, textnorm will be applied to text input. This feature is
+     * enabled by default. Only applies for Gemini TTS.
+     * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTextnorm. + */ + @java.lang.Override + public boolean getEnableTextnorm() { + return enableTextnorm_; + } + + /** + * + * + *
+     * Optional. If true, textnorm will be applied to text input. This feature is
+     * enabled by default. Only applies for Gemini TTS.
+     * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableTextnorm to set. + * @return This builder for chaining. + */ + public Builder setEnableTextnorm(boolean value) { + + enableTextnorm_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, textnorm will be applied to text input. This feature is
+     * enabled by default. Only applies for Gemini TTS.
+     * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableTextnorm() { + bitField0_ = (bitField0_ & ~0x00000008); + enableTextnorm_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.texttospeech.v1.AdvancedVoiceOptions) } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptionsOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptionsOrBuilder.java index 378d2c40d18b..d4dfa6b2409c 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptionsOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AdvancedVoiceOptionsOrBuilder.java @@ -58,17 +58,99 @@ public interface AdvancedVoiceOptionsOrBuilder * * *
-   * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-   * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-   * Otherwise, will return result
-   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * Optional. Input only. Deprecated, use safety_settings instead.
+   * If true, relaxes safety filters for Gemini TTS.
    * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.texttospeech.v1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1/cloud_tts.proto;l=224 * @return The relaxSafetyFilters. */ + @java.lang.Deprecated boolean getRelaxSafetyFilters(); + + /** + * + * + *
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
+   * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the safetySettings field is set. + */ + boolean hasSafetySettings(); + + /** + * + * + *
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
+   * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The safetySettings. + */ + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings getSafetySettings(); + + /** + * + * + *
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
+   * 
+ * + * + * .google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingsOrBuilder + getSafetySettingsOrBuilder(); + + /** + * + * + *
+   * Optional. If true, textnorm will be applied to text input. This feature is
+   * enabled by default. Only applies for Gemini TTS.
+   * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableTextnorm field is set. + */ + boolean hasEnableTextnorm(); + + /** + * + * + *
+   * Optional. If true, textnorm will be applied to text input. This feature is
+   * enabled by default. Only applies for Gemini TTS.
+   * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTextnorm. + */ + boolean getEnableTextnorm(); } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParams.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParams.java index 9515f875d8c2..8f11b5599deb 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParams.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParams.java @@ -321,7 +321,7 @@ public com.google.protobuf.ByteString getModelBytes() { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Override @@ -342,7 +342,7 @@ public int getReportedUsageValue() { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @return The reportedUsage. */ @java.lang.Override @@ -828,7 +828,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Override @@ -849,7 +849,7 @@ public int getReportedUsageValue() { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @param value The enum numeric value on the wire for reportedUsage to set. * @return This builder for chaining. */ @@ -873,7 +873,7 @@ public Builder setReportedUsageValue(int value) { * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @return The reportedUsage. */ @java.lang.Override @@ -899,7 +899,7 @@ public com.google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage getRepor * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @param value The reportedUsage to set. * @return This builder for chaining. */ @@ -927,7 +927,7 @@ public Builder setReportedUsage( * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java index 2e3834e9d6ad..745ebcdb5c09 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java @@ -68,7 +68,7 @@ public interface CustomVoiceParamsOrBuilder * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Deprecated @@ -86,7 +86,7 @@ public interface CustomVoiceParamsOrBuilder * * * @deprecated google.cloud.texttospeech.v1.CustomVoiceParams.reported_usage is deprecated. See - * google/cloud/texttospeech/v1/cloud_tts.proto;l=463 + * google/cloud/texttospeech/v1/cloud_tts.proto;l=531 * @return The reportedUsage. */ @java.lang.Deprecated diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesisInput.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesisInput.java index 6a0f571db3b1..0e086473cb20 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesisInput.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesisInput.java @@ -209,8 +209,8 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -225,8 +225,8 @@ public boolean hasMarkup() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -254,8 +254,8 @@ public java.lang.String getMarkup() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -1005,8 +1005,8 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1022,8 +1022,8 @@ public boolean hasMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1052,8 +1052,8 @@ public java.lang.String getMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1082,8 +1082,8 @@ public com.google.protobuf.ByteString getMarkupBytes() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1105,8 +1105,8 @@ public Builder setMarkup(java.lang.String value) { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1126,8 +1126,8 @@ public Builder clearMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesisInputOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesisInputOrBuilder.java index 7c1a2edce5a0..5054d803b849 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesisInputOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesisInputOrBuilder.java @@ -75,8 +75,8 @@ public interface StreamingSynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -89,8 +89,8 @@ public interface StreamingSynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -103,8 +103,8 @@ public interface StreamingSynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesizeConfig.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesizeConfig.java index e4a83ac1fd45..571ad6c0f7d9 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesizeConfig.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesizeConfig.java @@ -275,6 +275,66 @@ public com.google.cloud.texttospeech.v1.CustomPronunciations getCustomPronunciat : customPronunciations_; } + public static final int ADVANCED_VOICE_OPTIONS_FIELD_NUMBER = 7; + private com.google.cloud.texttospeech.v1.AdvancedVoiceOptions advancedVoiceOptions_; + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedVoiceOptions field is set. + */ + @java.lang.Override + public boolean hasAdvancedVoiceOptions() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedVoiceOptions. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions getAdvancedVoiceOptions() { + return advancedVoiceOptions_ == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.getDefaultInstance() + : advancedVoiceOptions_; + } + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptionsOrBuilder + getAdvancedVoiceOptionsOrBuilder() { + return advancedVoiceOptions_ == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.getDefaultInstance() + : advancedVoiceOptions_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -298,6 +358,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(5, getCustomPronunciations()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getAdvancedVoiceOptions()); + } getUnknownFields().writeTo(output); } @@ -318,6 +381,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCustomPronunciations()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAdvancedVoiceOptions()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -346,6 +413,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCustomPronunciations()) { if (!getCustomPronunciations().equals(other.getCustomPronunciations())) return false; } + if (hasAdvancedVoiceOptions() != other.hasAdvancedVoiceOptions()) return false; + if (hasAdvancedVoiceOptions()) { + if (!getAdvancedVoiceOptions().equals(other.getAdvancedVoiceOptions())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -369,6 +440,10 @@ public int hashCode() { hash = (37 * hash) + CUSTOM_PRONUNCIATIONS_FIELD_NUMBER; hash = (53 * hash) + getCustomPronunciations().hashCode(); } + if (hasAdvancedVoiceOptions()) { + hash = (37 * hash) + ADVANCED_VOICE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedVoiceOptions().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -514,6 +589,7 @@ private void maybeForceBuilderInitialization() { internalGetVoiceFieldBuilder(); internalGetStreamingAudioConfigFieldBuilder(); internalGetCustomPronunciationsFieldBuilder(); + internalGetAdvancedVoiceOptionsFieldBuilder(); } } @@ -536,6 +612,11 @@ public Builder clear() { customPronunciationsBuilder_.dispose(); customPronunciationsBuilder_ = null; } + advancedVoiceOptions_ = null; + if (advancedVoiceOptionsBuilder_ != null) { + advancedVoiceOptionsBuilder_.dispose(); + advancedVoiceOptionsBuilder_ = null; + } return this; } @@ -591,6 +672,13 @@ private void buildPartial0(com.google.cloud.texttospeech.v1.StreamingSynthesizeC : customPronunciationsBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.advancedVoiceOptions_ = + advancedVoiceOptionsBuilder_ == null + ? advancedVoiceOptions_ + : advancedVoiceOptionsBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -616,6 +704,9 @@ public Builder mergeFrom(com.google.cloud.texttospeech.v1.StreamingSynthesizeCon if (other.hasCustomPronunciations()) { mergeCustomPronunciations(other.getCustomPronunciations()); } + if (other.hasAdvancedVoiceOptions()) { + mergeAdvancedVoiceOptions(other.getAdvancedVoiceOptions()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -662,6 +753,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 42 + case 58: + { + input.readMessage( + internalGetAdvancedVoiceOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1412,6 +1510,224 @@ public Builder clearCustomPronunciations() { return customPronunciationsBuilder_; } + private com.google.cloud.texttospeech.v1.AdvancedVoiceOptions advancedVoiceOptions_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptionsOrBuilder> + advancedVoiceOptionsBuilder_; + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedVoiceOptions field is set. + */ + public boolean hasAdvancedVoiceOptions() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedVoiceOptions. + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions getAdvancedVoiceOptions() { + if (advancedVoiceOptionsBuilder_ == null) { + return advancedVoiceOptions_ == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.getDefaultInstance() + : advancedVoiceOptions_; + } else { + return advancedVoiceOptionsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvancedVoiceOptions( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions value) { + if (advancedVoiceOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedVoiceOptions_ = value; + } else { + advancedVoiceOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvancedVoiceOptions( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.Builder builderForValue) { + if (advancedVoiceOptionsBuilder_ == null) { + advancedVoiceOptions_ = builderForValue.build(); + } else { + advancedVoiceOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAdvancedVoiceOptions( + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions value) { + if (advancedVoiceOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && advancedVoiceOptions_ != null + && advancedVoiceOptions_ + != com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.getDefaultInstance()) { + getAdvancedVoiceOptionsBuilder().mergeFrom(value); + } else { + advancedVoiceOptions_ = value; + } + } else { + advancedVoiceOptionsBuilder_.mergeFrom(value); + } + if (advancedVoiceOptions_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdvancedVoiceOptions() { + bitField0_ = (bitField0_ & ~0x00000008); + advancedVoiceOptions_ = null; + if (advancedVoiceOptionsBuilder_ != null) { + advancedVoiceOptionsBuilder_.dispose(); + advancedVoiceOptionsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.Builder + getAdvancedVoiceOptionsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetAdvancedVoiceOptionsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.texttospeech.v1.AdvancedVoiceOptionsOrBuilder + getAdvancedVoiceOptionsOrBuilder() { + if (advancedVoiceOptionsBuilder_ != null) { + return advancedVoiceOptionsBuilder_.getMessageOrBuilder(); + } else { + return advancedVoiceOptions_ == null + ? com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.getDefaultInstance() + : advancedVoiceOptions_; + } + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptionsOrBuilder> + internalGetAdvancedVoiceOptionsFieldBuilder() { + if (advancedVoiceOptionsBuilder_ == null) { + advancedVoiceOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.Builder, + com.google.cloud.texttospeech.v1.AdvancedVoiceOptionsOrBuilder>( + getAdvancedVoiceOptions(), getParentForChildren(), isClean()); + advancedVoiceOptions_ = null; + } + return advancedVoiceOptionsBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.texttospeech.v1.StreamingSynthesizeConfig) } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesizeConfigOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesizeConfigOrBuilder.java index ec37bcb05389..2366a910aba0 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesizeConfigOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/StreamingSynthesizeConfigOrBuilder.java @@ -181,4 +181,47 @@ public interface StreamingSynthesizeConfigOrBuilder * */ com.google.cloud.texttospeech.v1.CustomPronunciationsOrBuilder getCustomPronunciationsOrBuilder(); + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedVoiceOptions field is set. + */ + boolean hasAdvancedVoiceOptions(); + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedVoiceOptions. + */ + com.google.cloud.texttospeech.v1.AdvancedVoiceOptions getAdvancedVoiceOptions(); + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.texttospeech.v1.AdvancedVoiceOptionsOrBuilder getAdvancedVoiceOptionsOrBuilder(); } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesisInput.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesisInput.java index c40ad0bc9e78..124ef3b80bac 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesisInput.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesisInput.java @@ -209,8 +209,8 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -225,8 +225,8 @@ public boolean hasMarkup() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -254,8 +254,8 @@ public java.lang.String getMarkup() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -1248,8 +1248,8 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1265,8 +1265,8 @@ public boolean hasMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1295,8 +1295,8 @@ public java.lang.String getMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1325,8 +1325,8 @@ public com.google.protobuf.ByteString getMarkupBytes() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1348,8 +1348,8 @@ public Builder setMarkup(java.lang.String value) { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1369,8 +1369,8 @@ public Builder clearMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesisInputOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesisInputOrBuilder.java index cfad4773aa6e..3d2cd829c40f 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesisInputOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesisInputOrBuilder.java @@ -69,8 +69,8 @@ public interface SynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -83,8 +83,8 @@ public interface SynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -97,8 +97,8 @@ public interface SynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesizeSpeechRequest.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesizeSpeechRequest.java index 67512e9e969b..0bcf7ca22968 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesizeSpeechRequest.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesizeSpeechRequest.java @@ -253,10 +253,11 @@ public com.google.cloud.texttospeech.v1.AudioConfigOrBuilder getAudioConfigOrBui * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the advancedVoiceOptions field is set. @@ -270,10 +271,11 @@ public boolean hasAdvancedVoiceOptions() { * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The advancedVoiceOptions. @@ -289,10 +291,11 @@ public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions getAdvancedVoiceOpt * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -1390,10 +1393,11 @@ public com.google.cloud.texttospeech.v1.AudioConfigOrBuilder getAudioConfigOrBui * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the advancedVoiceOptions field is set. @@ -1406,10 +1410,11 @@ public boolean hasAdvancedVoiceOptions() { * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The advancedVoiceOptions. @@ -1428,10 +1433,11 @@ public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions getAdvancedVoiceOpt * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setAdvancedVoiceOptions( @@ -1453,10 +1459,11 @@ public Builder setAdvancedVoiceOptions( * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setAdvancedVoiceOptions( @@ -1475,10 +1482,11 @@ public Builder setAdvancedVoiceOptions( * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeAdvancedVoiceOptions( @@ -1506,10 +1514,11 @@ public Builder mergeAdvancedVoiceOptions( * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearAdvancedVoiceOptions() { @@ -1527,10 +1536,11 @@ public Builder clearAdvancedVoiceOptions() { * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.texttospeech.v1.AdvancedVoiceOptions.Builder @@ -1544,10 +1554,11 @@ public Builder clearAdvancedVoiceOptions() { * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.texttospeech.v1.AdvancedVoiceOptionsOrBuilder @@ -1565,10 +1576,11 @@ public Builder clearAdvancedVoiceOptions() { * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesizeSpeechRequestOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesizeSpeechRequestOrBuilder.java index a363c1caa3fe..72c512a7104e 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesizeSpeechRequestOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SynthesizeSpeechRequestOrBuilder.java @@ -159,10 +159,11 @@ public interface SynthesizeSpeechRequestOrBuilder * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the advancedVoiceOptions field is set. @@ -173,10 +174,11 @@ public interface SynthesizeSpeechRequestOrBuilder * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The advancedVoiceOptions. @@ -187,10 +189,11 @@ public interface SynthesizeSpeechRequestOrBuilder * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* - * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * + * optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.texttospeech.v1.AdvancedVoiceOptionsOrBuilder getAdvancedVoiceOptionsOrBuilder(); diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java index 2d3a1a77a732..b1ec219e2325 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java @@ -56,6 +56,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_texttospeech_v1_SynthesizeSpeechRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -151,25 +159,50 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\002 \001(\t\022B\n" + "\013ssml_gender\030\003" + " \001(\0162-.google.cloud.texttospeech.v1.SsmlVoiceGender\022!\n" - + "\031natural_sample_rate_hertz\030\004 \001(\005\"\212\001\n" + + "\031natural_sample_rate_hertz\030\004 \001(\005\"\243\007\n" + "\024AdvancedVoiceOptions\022*\n" - + "\035low_latency_journey_synthesis\030\001 \001(\010H\000\210\001\001\022$\n" - + "\024relax_safety_filters\030\010 \001(\010B\006\340A\004\340A\001B \n" - + "\036_low_latency_journey_synthesis\"\335\002\n" + + "\035low_latency_journey_synthesis\030\001 \001(\010H\000\210\001\001\022&\n" + + "\024relax_safety_filters\030\010 \001(\010B\010\030\001\340A\004\340A\001\022b\n" + + "\017safety_settings\030\t \001(\013" + + "2A.google.cloud.texttospeech.v1.AdvancedVoiceOptions.SafetySettingsB\006\340A\004\340A\001\022!\n" + + "\017enable_textnorm\030\002 \001(\010B\003\340A\001H\001\210\001\001\032\274\001\n\r" + + "SafetySetting\022Q\n" + + "\010category\030\001 \001(\0162?.google.clou" + + "d.texttospeech.v1.AdvancedVoiceOptions.HarmCategory\022X\n" + + "\tthreshold\030\002 \001(\0162E.google." + + "cloud.texttospeech.v1.AdvancedVoiceOptions.HarmBlockThreshold\032d\n" + + "\016SafetySettings\022R\n" + + "\010settings\030\001 \003(\0132@.google.cloud.texttos" + + "peech.v1.AdvancedVoiceOptions.SafetySetting\"\264\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\"\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\005B \n" + + "\036_low_latency_journey_synthesisB\022\n" + + "\020_enable_textnorm\"\342\002\n" + "\027SynthesizeSpeechRequest\022@\n" - + "\005input\030\001" - + " \001(\0132,.google.cloud.texttospeech.v1.SynthesisInputB\003\340A\002\022F\n" - + "\005voice\030\002 \001(\01322.g" - + "oogle.cloud.texttospeech.v1.VoiceSelectionParamsB\003\340A\002\022D\n" - + "\014audio_config\030\003 \001(\0132).go" - + "ogle.cloud.texttospeech.v1.AudioConfigB\003\340A\002\022W\n" - + "\026advanced_voice_options\030\010 \001(\01322.go" - + "ogle.cloud.texttospeech.v1.AdvancedVoiceOptionsH\000\210\001\001B\031\n" + + "\005input\030\001 " + + "\001(\0132,.google.cloud.texttospeech.v1.SynthesisInputB\003\340A\002\022F\n" + + "\005voice\030\002 \001(\01322.google.c" + + "loud.texttospeech.v1.VoiceSelectionParamsB\003\340A\002\022D\n" + + "\014audio_config\030\003" + + " \001(\0132).google.cloud.texttospeech.v1.AudioConfigB\003\340A\002\022\\\n" + + "\026advanced_voice_options\030\010 \001(\01322.google.cl" + + "oud.texttospeech.v1.AdvancedVoiceOptionsB\003\340A\001H\000\210\001\001B\031\n" + "\027_advanced_voice_options\"\242\003\n" + "\031CustomPronunciationParams\022\023\n" + "\006phrase\030\001 \001(\tH\000\210\001\001\022h\n" - + "\021phonetic_encoding\030\002 \001(\0162H." - + "google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncodingH\001\210\001\001\022\032\n\r" + + "\021phonetic_encoding\030\002 \001(\0162H.go" + + "ogle.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncodingH\001\210\001\001\022\032\n\r" + "pronunciation\030\003 \001(\tH\002\210\001\001\"\266\001\n" + "\020PhoneticEncoding\022!\n" + "\035PHONETIC_ENCODING_UNSPECIFIED\020\000\022\031\n" @@ -181,11 +214,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022_phonetic_encodingB\020\n" + "\016_pronunciation\"g\n" + "\024CustomPronunciations\022O\n" - + "\016pronunciations\030\001 \003(\01327.google.cl" - + "oud.texttospeech.v1.CustomPronunciationParams\"\220\001\n" + + "\016pronunciations\030\001 \003(\01327.google.clou" + + "d.texttospeech.v1.CustomPronunciationParams\"\220\001\n" + "\022MultiSpeakerMarkup\022I\n" - + "\005turns\030\001 " - + "\003(\01325.google.cloud.texttospeech.v1.MultiSpeakerMarkup.TurnB\003\340A\002\032/\n" + + "\005turns\030\001 \003(" + + "\01325.google.cloud.texttospeech.v1.MultiSpeakerMarkup.TurnB\003\340A\002\032/\n" + "\004Turn\022\024\n" + "\007speaker\030\001 \001(\tB\003\340A\002\022\021\n" + "\004text\030\002 \001(\tB\003\340A\002\"P\n" @@ -202,8 +235,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024multi_speaker_markup\030\004" + " \001(\01320.google.cloud.texttospeech.v1.MultiSpeakerMarkupH\000\022\023\n" + "\006prompt\030\006 \001(\tH\001\210\001\001\022V\n" - + "\025custom_pronunciations\030\003 \001(\01322." - + "google.cloud.texttospeech.v1.CustomPronunciationsB\003\340A\001B\016\n" + + "\025custom_pronunciations\030\003 \001(\01322.go" + + "ogle.cloud.texttospeech.v1.CustomPronunciationsB\003\340A\001B\016\n" + "\014input_sourceB\t\n" + "\007_prompt\"\216\003\n" + "\024VoiceSelectionParams\022\032\n\r" @@ -211,16 +244,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\002 \001(\t\022B\n" + "\013ssml_gender\030\003" + " \001(\0162-.google.cloud.texttospeech.v1.SsmlVoiceGender\022E\n" - + "\014custom_voice\030\004 \001(\0132/" - + ".google.cloud.texttospeech.v1.CustomVoiceParams\022H\n" - + "\013voice_clone\030\005 \001(\0132..google.cl" - + "oud.texttospeech.v1.VoiceCloneParamsB\003\340A\001\022\027\n\n" + + "\014custom_voice\030\004 \001(\0132/.g" + + "oogle.cloud.texttospeech.v1.CustomVoiceParams\022H\n" + + "\013voice_clone\030\005 \001(\0132..google.clou" + + "d.texttospeech.v1.VoiceCloneParamsB\003\340A\001\022\027\n\n" + "model_name\030\006 \001(\tB\003\340A\001\022^\n" - + "\032multi_speaker_voice_config\030\007 \001(\01325.google.cloud.te" - + "xttospeech.v1.MultiSpeakerVoiceConfigB\003\340A\001\"\361\001\n" + + "\032multi_speaker_voice_config\030\007 \001(\01325.google.cloud.text" + + "tospeech.v1.MultiSpeakerVoiceConfigB\003\340A\001\"\361\001\n" + "\013AudioConfig\022H\n" - + "\016audio_encoding\030\001 \001" - + "(\0162+.google.cloud.texttospeech.v1.AudioEncodingB\003\340A\002\022\035\n\r" + + "\016audio_encoding\030\001 \001(\016" + + "2+.google.cloud.texttospeech.v1.AudioEncodingB\003\340A\002\022\035\n\r" + "speaking_rate\030\002 \001(\001B\006\340A\004\340A\001\022\025\n" + "\005pitch\030\003 \001(\001B\006\340A\004\340A\001\022\036\n" + "\016volume_gain_db\030\004 \001(\001B\006\340A\004\340A\001\022\036\n" @@ -229,8 +262,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021CustomVoiceParams\0222\n" + "\005model\030\001 \001(\tB#\340A\002\372A\035\n" + "\033automl.googleapis.com/Model\022\\\n" - + "\016reported_usage\030\003 \001(\0162=.google.cloud." - + "texttospeech.v1.CustomVoiceParams.ReportedUsageB\005\030\001\340A\001\"J\n\r" + + "\016reported_usage\030\003 \001(\0162=.google.cloud.te" + + "xttospeech.v1.CustomVoiceParams.ReportedUsageB\005\030\001\340A\001\"J\n\r" + "ReportedUsage\022\036\n" + "\032REPORTED_USAGE_UNSPECIFIED\020\000\022\014\n" + "\010REALTIME\020\001\022\013\n" @@ -240,17 +273,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030SynthesizeSpeechResponse\022\025\n\r" + "audio_content\030\001 \001(\014\"\237\001\n" + "\024StreamingAudioConfig\022H\n" - + "\016audio_encoding\030\001 \001" - + "(\0162+.google.cloud.texttospeech.v1.AudioEncodingB\003\340A\002\022\036\n" + + "\016audio_encoding\030\001 \001(\016" + + "2+.google.cloud.texttospeech.v1.AudioEncodingB\003\340A\002\022\036\n" + "\021sample_rate_hertz\030\002 \001(\005B\003\340A\001\022\035\n\r" - + "speaking_rate\030\003 \001(\001B\006\340A\004\340A\001\"\224\002\n" + + "speaking_rate\030\003 \001(\001B\006\340A\004\340A\001\"\215\003\n" + "\031StreamingSynthesizeConfig\022F\n" - + "\005voice\030\001 \001(\013" - + "22.google.cloud.texttospeech.v1.VoiceSelectionParamsB\003\340A\002\022W\n" + + "\005voice\030\001 \001(\01322" + + ".google.cloud.texttospeech.v1.VoiceSelectionParamsB\003\340A\002\022W\n" + "\026streaming_audio_config\030\004" + " \001(\01322.google.cloud.texttospeech.v1.StreamingAudioConfigB\003\340A\001\022V\n" + "\025custom_pronunciations\030\005" - + " \001(\01322.google.cloud.texttospeech.v1.CustomPronunciationsB\003\340A\001\"\275\001\n" + + " \001(\01322.google.cloud.texttospeech.v1.CustomPronunciationsB\003\340A\001\022\\\n" + + "\026advanced_voice_options\030\007 \001(\01322.google.cloud." + + "texttospeech.v1.AdvancedVoiceOptionsB\003\340A\001H\000\210\001\001B\031\n" + + "\027_advanced_voice_options\"\275\001\n" + "\027StreamingSynthesisInput\022\016\n" + "\004text\030\001 \001(\tH\000\022\020\n" + "\006markup\030\005 \001(\tH\000\022P\n" @@ -260,10 +296,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014input_sourceB\t\n" + "\007_prompt\"\316\001\n" + "\032StreamingSynthesizeRequest\022S\n" - + "\020streaming_config\030\001 " - + "\001(\01327.google.cloud.texttospeech.v1.StreamingSynthesizeConfigH\000\022F\n" - + "\005input\030\002 \001(\01325." - + "google.cloud.texttospeech.v1.StreamingSynthesisInputH\000B\023\n" + + "\020streaming_config\030\001 \001" + + "(\01327.google.cloud.texttospeech.v1.StreamingSynthesizeConfigH\000\022F\n" + + "\005input\030\002 \001(\01325.g" + + "oogle.cloud.texttospeech.v1.StreamingSynthesisInputH\000B\023\n" + "\021streaming_request\"4\n" + "\033StreamingSynthesizeResponse\022\025\n\r" + "audio_content\030\001 \001(\014*W\n" @@ -282,24 +318,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003PCM\020\007\022\007\n" + "\003M4A\020\0102\307\004\n" + "\014TextToSpeech\022\223\001\n\n" - + "ListVoices\022/.google.cloud.texttospe" - + "ech.v1.ListVoicesRequest\0320.google.cloud.texttospeech.v1.ListVoicesResponse\"\"\332A\r" + + "ListVoices\022/.google.cloud.texttospee" + + "ch.v1.ListVoicesRequest\0320.google.cloud.texttospeech.v1.ListVoicesResponse\"\"\332A\r" + "language_code\202\323\344\223\002\014\022\n" + "/v1/voices\022\274\001\n" - + "\020SynthesizeSpeech\0225.google.cloud.texttospeech." - + "v1.SynthesizeSpeechRequest\0326.google.cloud.texttospeech.v1.SynthesizeSpeechRespon" - + "se\"9\332A\030input,voice,audio_config\202\323\344\223\002\030\"\023/v1/text:synthesize:\001*\022\220\001\n" - + "\023StreamingSynthesize\0228.google.cloud.texttospeech.v1.Str" - + "eamingSynthesizeRequest\0329.google.cloud.texttospeech.v1.StreamingSynthesizeRespon" - + "se\"\000(\0010\001\032O\312A\033texttospeech.googleapis.com" - + "\322A.https://www.googleapis.com/auth/cloud-platformB\274\002\n" - + " com.google.cloud.texttospeech.v1B\021TextToSpeechProtoP\001ZDcloud.googl" - + "e.com/go/texttospeech/apiv1/texttospeech" - + "pb;texttospeechpb\242\002\004CTTS\252\002\034Google.Cloud." - + "TextToSpeech.V1\312\002\034Google\\Cloud\\TextToSpe" - + "ech\\V1\352\002\037Google::Cloud::TextToSpeech::V1\352AU\n" - + "\033automl.googleapis.com/Model\0226projects/{project}/locations/{location}/models" - + "/{model}b\006proto3" + + "\020SynthesizeSpeech\0225.google.cloud.texttospeech.v" + + "1.SynthesizeSpeechRequest\0326.google.cloud.texttospeech.v1.SynthesizeSpeechRespons" + + "e\"9\332A\030input,voice,audio_config\202\323\344\223\002\030\"\023/v1/text:synthesize:\001*\022\220\001\n" + + "\023StreamingSynthesize\0228.google.cloud.texttospeech.v1.Stre" + + "amingSynthesizeRequest\0329.google.cloud.texttospeech.v1.StreamingSynthesizeRespons" + + "e\"\000(\0010\001\032O\312A\033texttospeech.googleapis.com\322" + + "A.https://www.googleapis.com/auth/cloud-platformB\274\002\n" + + " com.google.cloud.texttospeech.v1B\021TextToSpeechProtoP\001ZDcloud.google" + + ".com/go/texttospeech/apiv1/texttospeechp" + + "b;texttospeechpb\242\002\004CTTS\252\002\034Google.Cloud.T" + + "extToSpeech.V1\312\002\034Google\\Cloud\\TextToSpee" + + "ch\\V1\352\002\037Google::Cloud::TextToSpeech::V1\352AU\n" + + "\033automl.googleapis.com/Model\0226projects/{project}/locations/{location}/models/" + + "{model}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -340,7 +376,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_descriptor, new java.lang.String[] { - "LowLatencyJourneySynthesis", "RelaxSafetyFilters", + "LowLatencyJourneySynthesis", + "RelaxSafetyFilters", + "SafetySettings", + "EnableTextnorm", + }); + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_descriptor = + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_descriptor.getNestedType( + 0); + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySetting_descriptor, + new java.lang.String[] { + "Category", "Threshold", + }); + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_descriptor = + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_descriptor.getNestedType( + 1); + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_texttospeech_v1_AdvancedVoiceOptions_SafetySettings_descriptor, + new java.lang.String[] { + "Settings", }); internal_static_google_cloud_texttospeech_v1_SynthesizeSpeechRequest_descriptor = getDescriptor().getMessageType(4); @@ -477,7 +534,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_texttospeech_v1_StreamingSynthesizeConfig_descriptor, new java.lang.String[] { - "Voice", "StreamingAudioConfig", "CustomPronunciations", + "Voice", "StreamingAudioConfig", "CustomPronunciations", "AdvancedVoiceOptions", }); internal_static_google_cloud_texttospeech_v1_StreamingSynthesisInput_descriptor = getDescriptor().getMessageType(18); diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto index a2715c818999..3de9cc439f51 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.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. @@ -161,18 +161,85 @@ message Voice { // Used for advanced voice options. message AdvancedVoiceOptions { + // Safety setting for a single harm category. + message SafetySetting { + // The harm category to apply the safety setting to. + HarmCategory category = 1; + + // The harm block threshold for the safety setting. + HarmBlockThreshold threshold = 2; + } + + // Safety settings for the request. + message SafetySettings { + // The safety settings for the request. + repeated SafetySetting settings = 1; + } + + // Harm categories that will block the content. + enum HarmCategory { + // Default value. This value is unused. + HARM_CATEGORY_UNSPECIFIED = 0; + + // Content that promotes violence or incites hatred against individuals or + // groups based on certain attributes. + HARM_CATEGORY_HATE_SPEECH = 1; + + // Content that promotes, facilitates, or enables dangerous activities. + HARM_CATEGORY_DANGEROUS_CONTENT = 2; + + // Abusive, threatening, or content intended to bully, torment, or ridicule. + HARM_CATEGORY_HARASSMENT = 3; + + // Content that contains sexually explicit material. + HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + } + + // Harm block thresholds for the safety settings. + enum HarmBlockThreshold { + // The harm block threshold is unspecified. + HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + + // Block content with a low harm probability or higher. + BLOCK_LOW_AND_ABOVE = 1; + + // Block content with a medium harm probability or higher. + BLOCK_MEDIUM_AND_ABOVE = 2; + + // Block content with a high harm probability. + BLOCK_ONLY_HIGH = 3; + + // Do not block any content, regardless of its harm probability. + BLOCK_NONE = 4; + + // Turn off the safety filter entirely. + OFF = 5; + } + // Only for Journey voices. If false, the synthesis is context aware // and has a higher latency. optional bool low_latency_journey_synthesis = 1; - // Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only - // supported for accounts linked to Invoiced (Offline) Cloud billing accounts. - // Otherwise, will return result - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + // Optional. Input only. Deprecated, use safety_settings instead. + // If true, relaxes safety filters for Gemini TTS. bool relax_safety_filters = 8 [ + deprecated = true, (google.api.field_behavior) = INPUT_ONLY, (google.api.field_behavior) = OPTIONAL ]; + + // Optional. Input only. This applies to Gemini TTS only. If set, the category + // specified in the safety setting will be blocked if the harm probability is + // above the threshold. Otherwise, the safety filter will be disabled by + // default. + SafetySettings safety_settings = 9 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If true, textnorm will be applied to text input. This feature is + // enabled by default. Only applies for Gemini TTS. + optional bool enable_textnorm = 2 [(google.api.field_behavior) = OPTIONAL]; } // The top-level message sent by the client for the `SynthesizeSpeech` method. @@ -186,8 +253,9 @@ message SynthesizeSpeechRequest { // Required. The configuration of the synthesized audio. AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED]; - // Advanced voice options. - optional AdvancedVoiceOptions advanced_voice_options = 8; + // Optional. Advanced voice options. + optional AdvancedVoiceOptions advanced_voice_options = 8 + [(google.api.field_behavior) = OPTIONAL]; } // Pronunciation customization for a phrase. @@ -296,8 +364,8 @@ message SynthesisInput { // The raw text to be synthesized. string text = 1; - // Markup for HD voices specifically. This field may not be used with any - // other voices. + // Markup for Chirp 3: HD voices specifically. This field may not be used + // with any other voices. string markup = 5; // The SSML document to be synthesized. The SSML document must be valid @@ -522,6 +590,10 @@ message StreamingSynthesizeConfig { // be inside a phoneme tag. CustomPronunciations custom_pronunciations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Advanced voice options. + optional AdvancedVoiceOptions advanced_voice_options = 7 + [(google.api.field_behavior) = OPTIONAL]; } // Input to be synthesized. @@ -532,8 +604,8 @@ message StreamingSynthesisInput { // in the output audio. string text = 1; - // Markup for HD voices specifically. This field may not be used with any - // other voices. + // Markup for Chirp 3: HD voices specifically. This field may not be used + // with any other voices. string markup = 5; // Multi-speaker markup for Gemini TTS. This field may not diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts_lrs.proto b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts_lrs.proto index b226ac495809..3a663ab50302 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts_lrs.proto +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts_lrs.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-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptions.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptions.java index b3fdf0d42f48..d87514a1b2ff 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptions.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptions.java @@ -68,6 +68,2392 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.Builder.class); } + /** + * + * + *
+   * Harm categories that will block the content.
+   * 
+ * + * Protobuf enum {@code google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory} + */ + public enum HarmCategory implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * HARM_CATEGORY_UNSPECIFIED = 0; + */ + HARM_CATEGORY_UNSPECIFIED(0), + /** + * + * + *
+     * Content that promotes violence or incites hatred against individuals or
+     * groups based on certain attributes.
+     * 
+ * + * HARM_CATEGORY_HATE_SPEECH = 1; + */ + HARM_CATEGORY_HATE_SPEECH(1), + /** + * + * + *
+     * Content that promotes, facilitates, or enables dangerous activities.
+     * 
+ * + * HARM_CATEGORY_DANGEROUS_CONTENT = 2; + */ + HARM_CATEGORY_DANGEROUS_CONTENT(2), + /** + * + * + *
+     * Abusive, threatening, or content intended to bully, torment, or ridicule.
+     * 
+ * + * HARM_CATEGORY_HARASSMENT = 3; + */ + HARM_CATEGORY_HARASSMENT(3), + /** + * + * + *
+     * Content that contains sexually explicit material.
+     * 
+ * + * HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + */ + HARM_CATEGORY_SEXUALLY_EXPLICIT(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HarmCategory"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * HARM_CATEGORY_UNSPECIFIED = 0; + */ + public static final int HARM_CATEGORY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Content that promotes violence or incites hatred against individuals or
+     * groups based on certain attributes.
+     * 
+ * + * HARM_CATEGORY_HATE_SPEECH = 1; + */ + public static final int HARM_CATEGORY_HATE_SPEECH_VALUE = 1; + + /** + * + * + *
+     * Content that promotes, facilitates, or enables dangerous activities.
+     * 
+ * + * HARM_CATEGORY_DANGEROUS_CONTENT = 2; + */ + public static final int HARM_CATEGORY_DANGEROUS_CONTENT_VALUE = 2; + + /** + * + * + *
+     * Abusive, threatening, or content intended to bully, torment, or ridicule.
+     * 
+ * + * HARM_CATEGORY_HARASSMENT = 3; + */ + public static final int HARM_CATEGORY_HARASSMENT_VALUE = 3; + + /** + * + * + *
+     * Content that contains sexually explicit material.
+     * 
+ * + * HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + */ + public static final int HARM_CATEGORY_SEXUALLY_EXPLICIT_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 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; + 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.texttospeech.v1beta1.AdvancedVoiceOptions.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.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory) + } + + /** + * + * + *
+   * Harm block thresholds for the safety settings.
+   * 
+ * + * Protobuf enum {@code google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold} + */ + public enum HarmBlockThreshold implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The harm block threshold is unspecified.
+     * 
+ * + * HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + */ + HARM_BLOCK_THRESHOLD_UNSPECIFIED(0), + /** + * + * + *
+     * Block content with a low harm probability or higher.
+     * 
+ * + * BLOCK_LOW_AND_ABOVE = 1; + */ + BLOCK_LOW_AND_ABOVE(1), + /** + * + * + *
+     * Block content with a medium harm probability or higher.
+     * 
+ * + * BLOCK_MEDIUM_AND_ABOVE = 2; + */ + BLOCK_MEDIUM_AND_ABOVE(2), + /** + * + * + *
+     * Block content with a high harm probability.
+     * 
+ * + * BLOCK_ONLY_HIGH = 3; + */ + BLOCK_ONLY_HIGH(3), + /** + * + * + *
+     * Do not block any content, regardless of its harm probability.
+     * 
+ * + * BLOCK_NONE = 4; + */ + BLOCK_NONE(4), + /** + * + * + *
+     * Turn off the safety filter entirely.
+     * 
+ * + * OFF = 5; + */ + OFF(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HarmBlockThreshold"); + } + + /** + * + * + *
+     * The harm block threshold is unspecified.
+     * 
+ * + * HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + */ + public static final int HARM_BLOCK_THRESHOLD_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Block content with a low harm probability or higher.
+     * 
+ * + * BLOCK_LOW_AND_ABOVE = 1; + */ + public static final int BLOCK_LOW_AND_ABOVE_VALUE = 1; + + /** + * + * + *
+     * Block content with a medium harm probability or higher.
+     * 
+ * + * BLOCK_MEDIUM_AND_ABOVE = 2; + */ + public static final int BLOCK_MEDIUM_AND_ABOVE_VALUE = 2; + + /** + * + * + *
+     * Block content with a high harm probability.
+     * 
+ * + * BLOCK_ONLY_HIGH = 3; + */ + public static final int BLOCK_ONLY_HIGH_VALUE = 3; + + /** + * + * + *
+     * Do not block any content, regardless of its harm probability.
+     * 
+ * + * BLOCK_NONE = 4; + */ + public static final int BLOCK_NONE_VALUE = 4; + + /** + * + * + *
+     * Turn off the safety filter entirely.
+     * 
+ * + * OFF = 5; + */ + public static final int OFF_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 HarmBlockThreshold 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 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.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + 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 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.texttospeech.v1beta1.AdvancedVoiceOptions.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final HarmBlockThreshold[] VALUES = values(); + + 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()]; + } + + private final int value; + + private HarmBlockThreshold(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold) + } + + public interface SafetySettingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The harm category to apply the safety setting to.
+     * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @return The enum numeric value on the wire for category. + */ + int getCategoryValue(); + + /** + * + * + *
+     * The harm category to apply the safety setting to.
+     * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @return The category. + */ + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory getCategory(); + + /** + * + * + *
+     * The harm block threshold for the safety setting.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The enum numeric value on the wire for threshold. + */ + int getThresholdValue(); + + /** + * + * + *
+     * The harm block threshold for the safety setting.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The threshold. + */ + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold getThreshold(); + } + + /** + * + * + *
+   * Safety setting for a single harm category.
+   * 
+ * + * Protobuf type {@code google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting} + */ + public static final class SafetySetting extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting) + SafetySettingOrBuilder { + 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= */ "", + "SafetySetting"); + } + + // Use SafetySetting.newBuilder() to construct. + private SafetySetting(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SafetySetting() { + category_ = 0; + threshold_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.class, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder + .class); + } + + public static final int CATEGORY_FIELD_NUMBER = 1; + private int category_ = 0; + + /** + * + * + *
+     * The harm category to apply the safety setting to.
+     * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + + /** + * + * + *
+     * The harm category to apply the safety setting to.
+     * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory getCategory() { + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory result = + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory.forNumber( + category_); + return result == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory.UNRECOGNIZED + : result; + } + + public static final int THRESHOLD_FIELD_NUMBER = 2; + private int threshold_ = 0; + + /** + * + * + *
+     * The harm block threshold for the safety setting.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The enum numeric value on the wire for threshold. + */ + @java.lang.Override + public int getThresholdValue() { + return threshold_; + } + + /** + * + * + *
+     * The harm block threshold for the safety setting.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The threshold. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold + getThreshold() { + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold result = + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold.forNumber( + threshold_); + return result == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold + .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 (category_ + != com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory + .HARM_CATEGORY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, category_); + } + if (threshold_ + != com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold + .HARM_BLOCK_THRESHOLD_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, threshold_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (category_ + != com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory + .HARM_CATEGORY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, category_); + } + if (threshold_ + != com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.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 boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting)) { + return super.equals(obj); + } + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting other = + (com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.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 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) + THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + threshold_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting 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 setting for a single harm category.
+     * 
+ * + * Protobuf type {@code google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting) + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.class, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder + .class); + } + + // Construct using + // com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.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; + threshold_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_descriptor; + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + getDefaultInstanceForType() { + return com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting build() { + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + buildPartial() { + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting result = + new com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.category_ = category_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.threshold_ = threshold_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting) { + return mergeFrom( + (com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting other) { + if (other + == com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.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; + } + + @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: + { + 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; + } + + private int bitField0_; + + private int category_ = 0; + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @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; + } + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory getCategory() { + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory result = + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory.forNumber( + category_); + return result == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + category_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The harm category to apply the safety setting to.
+       * 
+ * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmCategory category = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + bitField0_ = (bitField0_ & ~0x00000001); + category_ = 0; + onChanged(); + return this; + } + + private int threshold_ = 0; + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The enum numeric value on the wire for threshold. + */ + @java.lang.Override + public int getThresholdValue() { + return threshold_; + } + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @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; + } + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return The threshold. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold + getThreshold() { + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold result = + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold.forNumber( + threshold_); + return result == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @param value The threshold to set. + * @return This builder for chaining. + */ + public Builder setThreshold( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + threshold_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The harm block threshold for the safety setting.
+       * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold threshold = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearThreshold() { + bitField0_ = (bitField0_ & ~0x00000002); + threshold_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting) + } + + // @@protoc_insertion_point(class_scope:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting) + private static final com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting(); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + 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(); + } + }; + + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SafetySettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + java.util.List + getSettingsList(); + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting getSettings(int index); + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + int getSettingsCount(); + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder> + getSettingsOrBuilderList(); + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder + getSettingsOrBuilder(int index); + } + + /** + * + * + *
+   * Safety settings for the request.
+   * 
+ * + * Protobuf type {@code google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings} + */ + public static final class SafetySettings extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings) + SafetySettingsOrBuilder { + 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= */ "", + "SafetySettings"); + } + + // Use SafetySettings.newBuilder() to construct. + private SafetySettings(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SafetySettings() { + settings_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.class, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.Builder + .class); + } + + public static final int SETTINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + settings_; + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public java.util.List + getSettingsList() { + return settings_; + } + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder> + getSettingsOrBuilderList() { + return settings_; + } + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public int getSettingsCount() { + return settings_.size(); + } + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting getSettings( + int index) { + return settings_.get(index); + } + + /** + * + * + *
+     * The safety settings for the request.
+     * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder + getSettingsOrBuilder(int index) { + return settings_.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 < settings_.size(); i++) { + output.writeMessage(1, settings_.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 < settings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, settings_.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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings)) { + return super.equals(obj); + } + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings other = + (com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings) obj; + + if (!getSettingsList().equals(other.getSettingsList())) 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 (getSettingsCount() > 0) { + hash = (37 * hash) + SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSettingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings 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 settings for the request.
+     * 
+ * + * Protobuf type {@code google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings) + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.class, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.Builder + .class); + } + + // Construct using + // com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (settingsBuilder_ == null) { + settings_ = java.util.Collections.emptyList(); + } else { + settings_ = null; + settingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.texttospeech.v1beta1.TextToSpeechProto + .internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + getDefaultInstanceForType() { + return com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings build() { + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + buildPartial() { + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings result = + new com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings result) { + if (settingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + settings_ = java.util.Collections.unmodifiableList(settings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.settings_ = settings_; + } else { + result.settings_ = settingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings) { + return mergeFrom( + (com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings other) { + if (other + == com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance()) return this; + if (settingsBuilder_ == null) { + if (!other.settings_.isEmpty()) { + if (settings_.isEmpty()) { + settings_ = other.settings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSettingsIsMutable(); + settings_.addAll(other.settings_); + } + onChanged(); + } + } else { + if (!other.settings_.isEmpty()) { + if (settingsBuilder_.isEmpty()) { + settingsBuilder_.dispose(); + settingsBuilder_ = null; + settings_ = other.settings_; + bitField0_ = (bitField0_ & ~0x00000001); + settingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSettingsFieldBuilder() + : null; + } else { + settingsBuilder_.addAllMessages(other.settings_); + } + } + } + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting m = + input.readMessage( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + .parser(), + extensionRegistry); + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.add(m); + } else { + settingsBuilder_.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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting> + settings_ = java.util.Collections.emptyList(); + + private void ensureSettingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + settings_ = + new java.util.ArrayList< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting>( + settings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder> + settingsBuilder_; + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public java.util.List< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting> + getSettingsList() { + if (settingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(settings_); + } else { + return settingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public int getSettingsCount() { + if (settingsBuilder_ == null) { + return settings_.size(); + } else { + return settingsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting getSettings( + int index) { + if (settingsBuilder_ == null) { + return settings_.get(index); + } else { + return settingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder setSettings( + int index, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSettingsIsMutable(); + settings_.set(index, value); + onChanged(); + } else { + settingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder setSettings( + int index, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder + builderForValue) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.set(index, builderForValue.build()); + onChanged(); + } else { + settingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addSettings( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSettingsIsMutable(); + settings_.add(value); + onChanged(); + } else { + settingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addSettings( + int index, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSettingsIsMutable(); + settings_.add(index, value); + onChanged(); + } else { + settingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addSettings( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder + builderForValue) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.add(builderForValue.build()); + onChanged(); + } else { + settingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addSettings( + int index, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder + builderForValue) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.add(index, builderForValue.build()); + onChanged(); + } else { + settingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder addAllSettings( + java.lang.Iterable< + ? extends + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting> + values) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, settings_); + onChanged(); + } else { + settingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder clearSettings() { + if (settingsBuilder_ == null) { + settings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + settingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public Builder removeSettings(int index) { + if (settingsBuilder_ == null) { + ensureSettingsIsMutable(); + settings_.remove(index); + onChanged(); + } else { + settingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder + getSettingsBuilder(int index) { + return internalGetSettingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder + getSettingsOrBuilder(int index) { + if (settingsBuilder_ == null) { + return settings_.get(index); + } else { + return settingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder> + getSettingsOrBuilderList() { + if (settingsBuilder_ != null) { + return settingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(settings_); + } + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder + addSettingsBuilder() { + return internalGetSettingsFieldBuilder() + .addBuilder( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + .getDefaultInstance()); + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder + addSettingsBuilder(int index) { + return internalGetSettingsFieldBuilder() + .addBuilder( + index, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting + .getDefaultInstance()); + } + + /** + * + * + *
+       * The safety settings for the request.
+       * 
+ * + * + * repeated .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting settings = 1; + * + */ + public java.util.List< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder> + getSettingsBuilderList() { + return internalGetSettingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingOrBuilder> + internalGetSettingsFieldBuilder() { + if (settingsBuilder_ == null) { + settingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySetting.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions + .SafetySettingOrBuilder>( + settings_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + settings_ = null; + } + return settingsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings) + private static final com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings(); + } + + public static com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetySettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int LOW_LATENCY_JOURNEY_SYNTHESIS_FIELD_NUMBER = 1; private boolean lowLatencyJourneySynthesis_ = false; @@ -76,58 +2462,168 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Only for Journey voices. If false, the synthesis is context aware
-   * and has a higher latency.
+   * Only for Journey voices. If false, the synthesis is context aware
+   * and has a higher latency.
+   * 
+ * + * optional bool low_latency_journey_synthesis = 1; + * + * @return Whether the lowLatencyJourneySynthesis field is set. + */ + @java.lang.Override + public boolean hasLowLatencyJourneySynthesis() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Only for Journey voices. If false, the synthesis is context aware
+   * and has a higher latency.
+   * 
+ * + * optional bool low_latency_journey_synthesis = 1; + * + * @return The lowLatencyJourneySynthesis. + */ + @java.lang.Override + public boolean getLowLatencyJourneySynthesis() { + return lowLatencyJourneySynthesis_; + } + + public static final int RELAX_SAFETY_FILTERS_FIELD_NUMBER = 8; + private boolean relaxSafetyFilters_ = false; + + /** + * + * + *
+   * Optional. Input only. Deprecated, use safety_settings instead.
+   * If true, relaxes safety filters for Gemini TTS.
    * 
* - * optional bool low_latency_journey_synthesis = 1; + * + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * * - * @return Whether the lowLatencyJourneySynthesis field is set. + * @deprecated google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=227 + * @return The relaxSafetyFilters. */ @java.lang.Override - public boolean hasLowLatencyJourneySynthesis() { - return ((bitField0_ & 0x00000001) != 0); + @java.lang.Deprecated + public boolean getRelaxSafetyFilters() { + return relaxSafetyFilters_; } + public static final int SAFETY_SETTINGS_FIELD_NUMBER = 9; + private com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safetySettings_; + /** * * *
-   * Only for Journey voices. If false, the synthesis is context aware
-   * and has a higher latency.
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
    * 
* - * optional bool low_latency_journey_synthesis = 1; + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * * - * @return The lowLatencyJourneySynthesis. + * @return Whether the safetySettings field is set. */ @java.lang.Override - public boolean getLowLatencyJourneySynthesis() { - return lowLatencyJourneySynthesis_; + public boolean hasSafetySettings() { + return ((bitField0_ & 0x00000002) != 0); } - public static final int RELAX_SAFETY_FILTERS_FIELD_NUMBER = 8; - private boolean relaxSafetyFilters_ = false; + /** + * + * + *
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
+   * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The safetySettings. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + getSafetySettings() { + return safetySettings_ == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance() + : safetySettings_; + } /** * * *
-   * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-   * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-   * Otherwise, will return result
-   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
    * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingsOrBuilder + getSafetySettingsOrBuilder() { + return safetySettings_ == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance() + : safetySettings_; + } + + public static final int ENABLE_TEXTNORM_FIELD_NUMBER = 2; + private boolean enableTextnorm_ = false; + + /** * - * @return The relaxSafetyFilters. + * + *
+   * Optional. If true, textnorm will be applied to text input. This feature is
+   * enabled by default. Only applies for Gemini TTS.
+   * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableTextnorm field is set. */ @java.lang.Override - public boolean getRelaxSafetyFilters() { - return relaxSafetyFilters_; + public boolean hasEnableTextnorm() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. If true, textnorm will be applied to text input. This feature is
+   * enabled by default. Only applies for Gemini TTS.
+   * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTextnorm. + */ + @java.lang.Override + public boolean getEnableTextnorm() { + return enableTextnorm_; } private byte memoizedIsInitialized = -1; @@ -147,9 +2643,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(1, lowLatencyJourneySynthesis_); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(2, enableTextnorm_); + } if (relaxSafetyFilters_ != false) { output.writeBool(8, relaxSafetyFilters_); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getSafetySettings()); + } getUnknownFields().writeTo(output); } @@ -162,9 +2664,15 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, lowLatencyJourneySynthesis_); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableTextnorm_); + } if (relaxSafetyFilters_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, relaxSafetyFilters_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSafetySettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -186,6 +2694,14 @@ public boolean equals(final java.lang.Object obj) { if (getLowLatencyJourneySynthesis() != other.getLowLatencyJourneySynthesis()) return false; } if (getRelaxSafetyFilters() != other.getRelaxSafetyFilters()) return false; + if (hasSafetySettings() != other.hasSafetySettings()) return false; + if (hasSafetySettings()) { + if (!getSafetySettings().equals(other.getSafetySettings())) return false; + } + if (hasEnableTextnorm() != other.hasEnableTextnorm()) return false; + if (hasEnableTextnorm()) { + if (getEnableTextnorm() != other.getEnableTextnorm()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -204,6 +2720,14 @@ public int hashCode() { } hash = (37 * hash) + RELAX_SAFETY_FILTERS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRelaxSafetyFilters()); + if (hasSafetySettings()) { + hash = (37 * hash) + SAFETY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSafetySettings().hashCode(); + } + if (hasEnableTextnorm()) { + hash = (37 * hash) + ENABLE_TEXTNORM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableTextnorm()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -335,10 +2859,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.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) { + internalGetSafetySettingsFieldBuilder(); + } } @java.lang.Override @@ -347,6 +2880,12 @@ public Builder clear() { bitField0_ = 0; lowLatencyJourneySynthesis_ = false; relaxSafetyFilters_ = false; + safetySettings_ = null; + if (safetySettingsBuilder_ != null) { + safetySettingsBuilder_.dispose(); + safetySettingsBuilder_ = null; + } + enableTextnorm_ = false; return this; } @@ -391,6 +2930,15 @@ private void buildPartial0(com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOp if (((from_bitField0_ & 0x00000002) != 0)) { result.relaxSafetyFilters_ = relaxSafetyFilters_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.safetySettings_ = + safetySettingsBuilder_ == null ? safetySettings_ : safetySettingsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.enableTextnorm_ = enableTextnorm_; + to_bitField0_ |= 0x00000004; + } result.bitField0_ |= to_bitField0_; } @@ -413,6 +2961,12 @@ public Builder mergeFrom(com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOpti if (other.getRelaxSafetyFilters() != false) { setRelaxSafetyFilters(other.getRelaxSafetyFilters()); } + if (other.hasSafetySettings()) { + mergeSafetySettings(other.getSafetySettings()); + } + if (other.hasEnableTextnorm()) { + setEnableTextnorm(other.getEnableTextnorm()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -445,12 +2999,25 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 16: + { + enableTextnorm_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 16 case 64: { relaxSafetyFilters_ = input.readBool(); bitField0_ |= 0x00000002; break; } // case 64 + case 74: + { + input.readMessage( + internalGetSafetySettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -552,19 +3119,20 @@ public Builder clearLowLatencyJourneySynthesis() { * * *
-     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-     * Otherwise, will return result
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * Optional. Input only. Deprecated, use safety_settings instead.
+     * If true, relaxes safety filters for Gemini TTS.
      * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=227 * @return The relaxSafetyFilters. */ @java.lang.Override + @java.lang.Deprecated public boolean getRelaxSafetyFilters() { return relaxSafetyFilters_; } @@ -573,19 +3141,20 @@ public boolean getRelaxSafetyFilters() { * * *
-     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-     * Otherwise, will return result
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * Optional. Input only. Deprecated, use safety_settings instead.
+     * If true, relaxes safety filters for Gemini TTS.
      * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=227 * @param value The relaxSafetyFilters to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setRelaxSafetyFilters(boolean value) { relaxSafetyFilters_ = value; @@ -598,18 +3167,19 @@ public Builder setRelaxSafetyFilters(boolean value) { * * *
-     * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-     * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-     * Otherwise, will return result
-     * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * Optional. Input only. Deprecated, use safety_settings instead.
+     * If true, relaxes safety filters for Gemini TTS.
      * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=227 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearRelaxSafetyFilters() { bitField0_ = (bitField0_ & ~0x00000002); relaxSafetyFilters_ = false; @@ -617,6 +3187,333 @@ public Builder clearRelaxSafetyFilters() { return this; } + private com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + safetySettings_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingsOrBuilder> + safetySettingsBuilder_; + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the safetySettings field is set. + */ + public boolean hasSafetySettings() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The safetySettings. + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + getSafetySettings() { + if (safetySettingsBuilder_ == null) { + return safetySettings_ == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance() + : safetySettings_; + } else { + return safetySettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSafetySettings( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings value) { + if (safetySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safetySettings_ = value; + } else { + safetySettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSafetySettings( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.Builder + builderForValue) { + if (safetySettingsBuilder_ == null) { + safetySettings_ = builderForValue.build(); + } else { + safetySettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSafetySettings( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings value) { + if (safetySettingsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && safetySettings_ != null + && safetySettings_ + != com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance()) { + getSafetySettingsBuilder().mergeFrom(value); + } else { + safetySettings_ = value; + } + } else { + safetySettingsBuilder_.mergeFrom(value); + } + if (safetySettings_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSafetySettings() { + bitField0_ = (bitField0_ & ~0x00000004); + safetySettings_ = null; + if (safetySettingsBuilder_ != null) { + safetySettingsBuilder_.dispose(); + safetySettingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.Builder + getSafetySettingsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetSafetySettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingsOrBuilder + getSafetySettingsOrBuilder() { + if (safetySettingsBuilder_ != null) { + return safetySettingsBuilder_.getMessageOrBuilder(); + } else { + return safetySettings_ == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings + .getDefaultInstance() + : safetySettings_; + } + } + + /** + * + * + *
+     * Optional. Input only. This applies to Gemini TTS only. If set, the category
+     * specified in the safety setting will be blocked if the harm probability is
+     * above the threshold. Otherwise, the safety filter will be disabled by
+     * default.
+     * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingsOrBuilder> + internalGetSafetySettingsFieldBuilder() { + if (safetySettingsBuilder_ == null) { + safetySettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingsOrBuilder>( + getSafetySettings(), getParentForChildren(), isClean()); + safetySettings_ = null; + } + return safetySettingsBuilder_; + } + + private boolean enableTextnorm_; + + /** + * + * + *
+     * Optional. If true, textnorm will be applied to text input. This feature is
+     * enabled by default. Only applies for Gemini TTS.
+     * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableTextnorm field is set. + */ + @java.lang.Override + public boolean hasEnableTextnorm() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. If true, textnorm will be applied to text input. This feature is
+     * enabled by default. Only applies for Gemini TTS.
+     * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTextnorm. + */ + @java.lang.Override + public boolean getEnableTextnorm() { + return enableTextnorm_; + } + + /** + * + * + *
+     * Optional. If true, textnorm will be applied to text input. This feature is
+     * enabled by default. Only applies for Gemini TTS.
+     * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableTextnorm to set. + * @return This builder for chaining. + */ + public Builder setEnableTextnorm(boolean value) { + + enableTextnorm_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, textnorm will be applied to text input. This feature is
+     * enabled by default. Only applies for Gemini TTS.
+     * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableTextnorm() { + bitField0_ = (bitField0_ & ~0x00000008); + enableTextnorm_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions) } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptionsOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptionsOrBuilder.java index 749aaef8fd40..1391750d891a 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptionsOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/AdvancedVoiceOptionsOrBuilder.java @@ -58,17 +58,99 @@ public interface AdvancedVoiceOptionsOrBuilder * * *
-   * Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
-   * supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
-   * Otherwise, will return result
-   * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+   * Optional. Input only. Deprecated, use safety_settings instead.
+   * If true, relaxes safety filters for Gemini TTS.
    * 
* * - * bool relax_safety_filters = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * bool relax_safety_filters = 8 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.relax_safety_filters is + * deprecated. See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=227 * @return The relaxSafetyFilters. */ + @java.lang.Deprecated boolean getRelaxSafetyFilters(); + + /** + * + * + *
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
+   * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the safetySettings field is set. + */ + boolean hasSafetySettings(); + + /** + * + * + *
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
+   * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The safetySettings. + */ + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings getSafetySettings(); + + /** + * + * + *
+   * Optional. Input only. This applies to Gemini TTS only. If set, the category
+   * specified in the safety setting will be blocked if the harm probability is
+   * above the threshold. Otherwise, the safety filter will be disabled by
+   * default.
+   * 
+ * + * + * .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettings safety_settings = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.SafetySettingsOrBuilder + getSafetySettingsOrBuilder(); + + /** + * + * + *
+   * Optional. If true, textnorm will be applied to text input. This feature is
+   * enabled by default. Only applies for Gemini TTS.
+   * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableTextnorm field is set. + */ + boolean hasEnableTextnorm(); + + /** + * + * + *
+   * Optional. If true, textnorm will be applied to text input. This feature is
+   * enabled by default. Only applies for Gemini TTS.
+   * 
+ * + * optional bool enable_textnorm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTextnorm. + */ + boolean getEnableTextnorm(); } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParams.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParams.java index 16cf28a4a8eb..0eb4e804cca1 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParams.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParams.java @@ -321,7 +321,7 @@ public com.google.protobuf.ByteString getModelBytes() { *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Override @@ -342,7 +342,7 @@ public int getReportedUsageValue() { *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @return The reportedUsage. */ @java.lang.Override @@ -830,7 +830,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Override @@ -851,7 +851,7 @@ public int getReportedUsageValue() { *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @param value The enum numeric value on the wire for reportedUsage to set. * @return This builder for chaining. */ @@ -875,7 +875,7 @@ public Builder setReportedUsageValue(int value) { *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @return The reportedUsage. */ @java.lang.Override @@ -902,7 +902,7 @@ public Builder setReportedUsageValue(int value) { *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @param value The reportedUsage to set. * @return This builder for chaining. */ @@ -930,7 +930,7 @@ public Builder setReportedUsage( *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParamsOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParamsOrBuilder.java index 524c7c255003..2cd15c494127 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParamsOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/CustomVoiceParamsOrBuilder.java @@ -68,7 +68,7 @@ public interface CustomVoiceParamsOrBuilder *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @return The enum numeric value on the wire for reportedUsage. */ @java.lang.Deprecated @@ -86,7 +86,7 @@ public interface CustomVoiceParamsOrBuilder *
* * @deprecated google.cloud.texttospeech.v1beta1.CustomVoiceParams.reported_usage is deprecated. - * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=478 + * See google/cloud/texttospeech/v1beta1/cloud_tts.proto;l=546 * @return The reportedUsage. */ @java.lang.Deprecated diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesisInput.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesisInput.java index 19e03443e3cb..e800ed49ec66 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesisInput.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesisInput.java @@ -209,8 +209,8 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -225,8 +225,8 @@ public boolean hasMarkup() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -254,8 +254,8 @@ public java.lang.String getMarkup() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -1009,8 +1009,8 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1026,8 +1026,8 @@ public boolean hasMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1056,8 +1056,8 @@ public java.lang.String getMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1086,8 +1086,8 @@ public com.google.protobuf.ByteString getMarkupBytes() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1109,8 +1109,8 @@ public Builder setMarkup(java.lang.String value) { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1130,8 +1130,8 @@ public Builder clearMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesisInputOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesisInputOrBuilder.java index d8d9836756c8..96ac89a4473f 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesisInputOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesisInputOrBuilder.java @@ -75,8 +75,8 @@ public interface StreamingSynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -89,8 +89,8 @@ public interface StreamingSynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -103,8 +103,8 @@ public interface StreamingSynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesizeConfig.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesizeConfig.java index b019eace35a7..30b788de8edc 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesizeConfig.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesizeConfig.java @@ -275,6 +275,66 @@ public com.google.cloud.texttospeech.v1beta1.CustomPronunciations getCustomPronu : customPronunciations_; } + public static final int ADVANCED_VOICE_OPTIONS_FIELD_NUMBER = 7; + private com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advancedVoiceOptions_; + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedVoiceOptions field is set. + */ + @java.lang.Override + public boolean hasAdvancedVoiceOptions() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedVoiceOptions. + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions getAdvancedVoiceOptions() { + return advancedVoiceOptions_ == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.getDefaultInstance() + : advancedVoiceOptions_; + } + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsOrBuilder + getAdvancedVoiceOptionsOrBuilder() { + return advancedVoiceOptions_ == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.getDefaultInstance() + : advancedVoiceOptions_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -298,6 +358,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(5, getCustomPronunciations()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getAdvancedVoiceOptions()); + } getUnknownFields().writeTo(output); } @@ -318,6 +381,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCustomPronunciations()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAdvancedVoiceOptions()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -346,6 +413,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCustomPronunciations()) { if (!getCustomPronunciations().equals(other.getCustomPronunciations())) return false; } + if (hasAdvancedVoiceOptions() != other.hasAdvancedVoiceOptions()) return false; + if (hasAdvancedVoiceOptions()) { + if (!getAdvancedVoiceOptions().equals(other.getAdvancedVoiceOptions())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -369,6 +440,10 @@ public int hashCode() { hash = (37 * hash) + CUSTOM_PRONUNCIATIONS_FIELD_NUMBER; hash = (53 * hash) + getCustomPronunciations().hashCode(); } + if (hasAdvancedVoiceOptions()) { + hash = (37 * hash) + ADVANCED_VOICE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedVoiceOptions().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -514,6 +589,7 @@ private void maybeForceBuilderInitialization() { internalGetVoiceFieldBuilder(); internalGetStreamingAudioConfigFieldBuilder(); internalGetCustomPronunciationsFieldBuilder(); + internalGetAdvancedVoiceOptionsFieldBuilder(); } } @@ -536,6 +612,11 @@ public Builder clear() { customPronunciationsBuilder_.dispose(); customPronunciationsBuilder_ = null; } + advancedVoiceOptions_ = null; + if (advancedVoiceOptionsBuilder_ != null) { + advancedVoiceOptionsBuilder_.dispose(); + advancedVoiceOptionsBuilder_ = null; + } return this; } @@ -593,6 +674,13 @@ private void buildPartial0( : customPronunciationsBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.advancedVoiceOptions_ = + advancedVoiceOptionsBuilder_ == null + ? advancedVoiceOptions_ + : advancedVoiceOptionsBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -620,6 +708,9 @@ public Builder mergeFrom( if (other.hasCustomPronunciations()) { mergeCustomPronunciations(other.getCustomPronunciations()); } + if (other.hasAdvancedVoiceOptions()) { + mergeAdvancedVoiceOptions(other.getAdvancedVoiceOptions()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -666,6 +757,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 42 + case 58: + { + input.readMessage( + internalGetAdvancedVoiceOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1419,6 +1517,225 @@ public Builder clearCustomPronunciations() { return customPronunciationsBuilder_; } + private com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advancedVoiceOptions_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsOrBuilder> + advancedVoiceOptionsBuilder_; + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedVoiceOptions field is set. + */ + public boolean hasAdvancedVoiceOptions() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedVoiceOptions. + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions getAdvancedVoiceOptions() { + if (advancedVoiceOptionsBuilder_ == null) { + return advancedVoiceOptions_ == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.getDefaultInstance() + : advancedVoiceOptions_; + } else { + return advancedVoiceOptionsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvancedVoiceOptions( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions value) { + if (advancedVoiceOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedVoiceOptions_ = value; + } else { + advancedVoiceOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvancedVoiceOptions( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.Builder builderForValue) { + if (advancedVoiceOptionsBuilder_ == null) { + advancedVoiceOptions_ = builderForValue.build(); + } else { + advancedVoiceOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAdvancedVoiceOptions( + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions value) { + if (advancedVoiceOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && advancedVoiceOptions_ != null + && advancedVoiceOptions_ + != com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions + .getDefaultInstance()) { + getAdvancedVoiceOptionsBuilder().mergeFrom(value); + } else { + advancedVoiceOptions_ = value; + } + } else { + advancedVoiceOptionsBuilder_.mergeFrom(value); + } + if (advancedVoiceOptions_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdvancedVoiceOptions() { + bitField0_ = (bitField0_ & ~0x00000008); + advancedVoiceOptions_ = null; + if (advancedVoiceOptionsBuilder_ != null) { + advancedVoiceOptionsBuilder_.dispose(); + advancedVoiceOptionsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.Builder + getAdvancedVoiceOptionsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetAdvancedVoiceOptionsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsOrBuilder + getAdvancedVoiceOptionsOrBuilder() { + if (advancedVoiceOptionsBuilder_ != null) { + return advancedVoiceOptionsBuilder_.getMessageOrBuilder(); + } else { + return advancedVoiceOptions_ == null + ? com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.getDefaultInstance() + : advancedVoiceOptions_; + } + } + + /** + * + * + *
+     * Optional. Advanced voice options.
+     * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsOrBuilder> + internalGetAdvancedVoiceOptionsFieldBuilder() { + if (advancedVoiceOptionsBuilder_ == null) { + advancedVoiceOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.Builder, + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsOrBuilder>( + getAdvancedVoiceOptions(), getParentForChildren(), isClean()); + advancedVoiceOptions_ = null; + } + return advancedVoiceOptionsBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.texttospeech.v1beta1.StreamingSynthesizeConfig) } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesizeConfigOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesizeConfigOrBuilder.java index 982ccd292af2..2a340de01b3b 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesizeConfigOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/StreamingSynthesizeConfigOrBuilder.java @@ -183,4 +183,48 @@ public interface StreamingSynthesizeConfigOrBuilder */ com.google.cloud.texttospeech.v1beta1.CustomPronunciationsOrBuilder getCustomPronunciationsOrBuilder(); + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedVoiceOptions field is set. + */ + boolean hasAdvancedVoiceOptions(); + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedVoiceOptions. + */ + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions getAdvancedVoiceOptions(); + + /** + * + * + *
+   * Optional. Advanced voice options.
+   * 
+ * + * + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsOrBuilder + getAdvancedVoiceOptionsOrBuilder(); } diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesisInput.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesisInput.java index ef9c08581700..2fc3bc75f22d 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesisInput.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesisInput.java @@ -209,8 +209,8 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -225,8 +225,8 @@ public boolean hasMarkup() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -254,8 +254,8 @@ public java.lang.String getMarkup() { * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -1249,8 +1249,8 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1266,8 +1266,8 @@ public boolean hasMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1296,8 +1296,8 @@ public java.lang.String getMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1326,8 +1326,8 @@ public com.google.protobuf.ByteString getMarkupBytes() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1349,8 +1349,8 @@ public Builder setMarkup(java.lang.String value) { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; @@ -1370,8 +1370,8 @@ public Builder clearMarkup() { * * *
-     * Markup for HD voices specifically. This field may not be used with any
-     * other voices.
+     * Markup for Chirp 3: HD voices specifically. This field may not be used
+     * with any other voices.
      * 
* * string markup = 5; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesisInputOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesisInputOrBuilder.java index 2a6b327ce733..dd2af77c6357 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesisInputOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesisInputOrBuilder.java @@ -69,8 +69,8 @@ public interface SynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -83,8 +83,8 @@ public interface SynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; @@ -97,8 +97,8 @@ public interface SynthesisInputOrBuilder * * *
-   * Markup for HD voices specifically. This field may not be used with any
-   * other voices.
+   * Markup for Chirp 3: HD voices specifically. This field may not be used
+   * with any other voices.
    * 
* * string markup = 5; diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeSpeechRequest.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeSpeechRequest.java index 20a15d6e6b5c..f32fecf30bab 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeSpeechRequest.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeSpeechRequest.java @@ -523,11 +523,11 @@ public int getEnableTimePointingValue(int index) { * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the advancedVoiceOptions field is set. @@ -541,11 +541,11 @@ public boolean hasAdvancedVoiceOptions() { * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The advancedVoiceOptions. @@ -561,11 +561,11 @@ public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions getAdvancedVoi * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -1998,11 +1998,11 @@ public Builder addAllEnableTimePointingValue(java.lang.Iterable - * Advanced voice options. + * Optional. Advanced voice options. * * * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the advancedVoiceOptions field is set. @@ -2015,11 +2015,11 @@ public boolean hasAdvancedVoiceOptions() { * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The advancedVoiceOptions. @@ -2038,11 +2038,11 @@ public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions getAdvancedVoi * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setAdvancedVoiceOptions( @@ -2064,11 +2064,11 @@ public Builder setAdvancedVoiceOptions( * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setAdvancedVoiceOptions( @@ -2087,11 +2087,11 @@ public Builder setAdvancedVoiceOptions( * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeAdvancedVoiceOptions( @@ -2120,11 +2120,11 @@ public Builder mergeAdvancedVoiceOptions( * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearAdvancedVoiceOptions() { @@ -2142,11 +2142,11 @@ public Builder clearAdvancedVoiceOptions() { * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions.Builder @@ -2160,11 +2160,11 @@ public Builder clearAdvancedVoiceOptions() { * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsOrBuilder @@ -2182,11 +2182,11 @@ public Builder clearAdvancedVoiceOptions() { * * *
-     * Advanced voice options.
+     * Optional. Advanced voice options.
      * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeSpeechRequestOrBuilder.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeSpeechRequestOrBuilder.java index e759a21d47e9..6b1da35a4345 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeSpeechRequestOrBuilder.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeSpeechRequestOrBuilder.java @@ -238,11 +238,11 @@ com.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType getE * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the advancedVoiceOptions field is set. @@ -253,11 +253,11 @@ com.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType getE * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The advancedVoiceOptions. @@ -268,11 +268,11 @@ com.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType getE * * *
-   * Advanced voice options.
+   * Optional. Advanced voice options.
    * 
* * - * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8; + * optional .google.cloud.texttospeech.v1beta1.AdvancedVoiceOptions advanced_voice_options = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsOrBuilder diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechProto.java b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechProto.java index c50f5a60e7f8..39effbdec03d 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechProto.java +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechProto.java @@ -56,6 +56,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_texttospeech_v1beta1_SynthesizeSpeechRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -155,30 +163,55 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\002 \001(\t\022G\n" + "\013ssml_gender\030\003 \001(\0162" + "2.google.cloud.texttospeech.v1beta1.SsmlVoiceGender\022!\n" - + "\031natural_sample_rate_hertz\030\004 \001(\005\"\212\001\n" + + "\031natural_sample_rate_hertz\030\004 \001(\005\"\267\007\n" + "\024AdvancedVoiceOptions\022*\n" - + "\035low_latency_journey_synthesis\030\001 \001(\010H\000\210\001\001\022$\n" - + "\024relax_safety_filters\030\010 \001(\010B\006\340A\004\340A\001B \n" - + "\036_low_latency_journey_synthesis\"\231\004\n" + + "\035low_latency_journey_synthesis\030\001 \001(\010H\000\210\001\001\022&\n" + + "\024relax_safety_filters\030\010 \001(\010B\010\030\001\340A\004\340A\001\022g\n" + + "\017safety_settings\030\t \001(\0132F.google.cloud.text" + + "tospeech.v1beta1.AdvancedVoiceOptions.SafetySettingsB\006\340A\004\340A\001\022!\n" + + "\017enable_textnorm\030\002 \001(\010B\003\340A\001H\001\210\001\001\032\306\001\n\r" + + "SafetySetting\022V\n" + + "\010category\030\001 \001(\0162D.google.cloud.texttospeech." + + "v1beta1.AdvancedVoiceOptions.HarmCategory\022]\n" + + "\tthreshold\030\002 \001(\0162J.google.cloud.text" + + "tospeech.v1beta1.AdvancedVoiceOptions.HarmBlockThreshold\032i\n" + + "\016SafetySettings\022W\n" + + "\010settings\030\001 \003(\0132E.google.cloud.texttospeech" + + ".v1beta1.AdvancedVoiceOptions.SafetySetting\"\264\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\"\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\005B \n" + + "\036_low_latency_journey_synthesisB\022\n" + + "\020_enable_textnorm\"\236\004\n" + "\027SynthesizeSpeechRequest\022E\n" - + "\005input\030\001 \001(\01321.google." - + "cloud.texttospeech.v1beta1.SynthesisInputB\003\340A\002\022K\n" - + "\005voice\030\002 \001(\01327.google.cloud.tex" - + "ttospeech.v1beta1.VoiceSelectionParamsB\003\340A\002\022I\n" - + "\014audio_config\030\003 \001(\0132..google.cloud" - + ".texttospeech.v1beta1.AudioConfigB\003\340A\002\022f\n" - + "\024enable_time_pointing\030\004 \003(\0162H.google.cl" - + "oud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType\022\\\n" - + "\026advanced_voice_options\030\010" - + " \001(\01327.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsH\000\210\001\001\">\n\r" + + "\005input\030\001 " + + "\001(\01321.google.cloud.texttospeech.v1beta1.SynthesisInputB\003\340A\002\022K\n" + + "\005voice\030\002 \001(\01327.goo" + + "gle.cloud.texttospeech.v1beta1.VoiceSelectionParamsB\003\340A\002\022I\n" + + "\014audio_config\030\003 \001(\0132." + + ".google.cloud.texttospeech.v1beta1.AudioConfigB\003\340A\002\022f\n" + + "\024enable_time_pointing\030\004 \003(" + + "\0162H.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest.TimepointType\022a\n" + + "\026advanced_voice_options\030\010 \001(\01327.google.clo" + + "ud.texttospeech.v1beta1.AdvancedVoiceOptionsB\003\340A\001H\000\210\001\001\">\n\r" + "TimepointType\022\036\n" + "\032TIMEPOINT_TYPE_UNSPECIFIED\020\000\022\r\n" + "\tSSML_MARK\020\001B\031\n" + "\027_advanced_voice_options\"\247\003\n" + "\031CustomPronunciationParams\022\023\n" + "\006phrase\030\001 \001(\tH\000\210\001\001\022m\n" - + "\021phonetic_encoding\030\002 \001(\0162M.google.cloud.texttospeech.v1beta" - + "1.CustomPronunciationParams.PhoneticEncodingH\001\210\001\001\022\032\n\r" + + "\021phonetic_encoding\030\002 \001(\0162M.google.cloud.t" + + "exttospeech.v1beta1.CustomPronunciationParams.PhoneticEncodingH\001\210\001\001\022\032\n\r" + "pronunciation\030\003 \001(\tH\002\210\001\001\"\266\001\n" + "\020PhoneticEncoding\022!\n" + "\035PHONETIC_ENCODING_UNSPECIFIED\020\000\022\031\n" @@ -190,11 +223,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022_phonetic_encodingB\020\n" + "\016_pronunciation\"l\n" + "\024CustomPronunciations\022T\n" - + "\016pronunciations\030\001 \003(" - + "\0132<.google.cloud.texttospeech.v1beta1.CustomPronunciationParams\"\225\001\n" + + "\016pronunciations\030\001 \003(\0132<.google.cloud.textt" + + "ospeech.v1beta1.CustomPronunciationParams\"\225\001\n" + "\022MultiSpeakerMarkup\022N\n" - + "\005turns\030\001 \003(\0132:.google.cloud.tex" - + "ttospeech.v1beta1.MultiSpeakerMarkup.TurnB\003\340A\002\032/\n" + + "\005turns\030\001 \003(\0132" + + ":.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkup.TurnB\003\340A\002\032/\n" + "\004Turn\022\024\n" + "\007speaker\030\001 \001(\tB\003\340A\002\022\021\n" + "\004text\030\002 \001(\tB\003\340A\002\"P\n" @@ -202,17 +235,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "speaker_alias\030\001 \001(\tB\003\340A\002\022\027\n\n" + "speaker_id\030\002 \001(\tB\003\340A\002\"{\n" + "\027MultiSpeakerVoiceConfig\022`\n" - + "\025speaker_voice_configs\030\002 \003(\0132<.go" - + "ogle.cloud.texttospeech.v1beta1.MultispeakerPrebuiltVoiceB\003\340A\002\"\246\002\n" + + "\025speaker_voice_configs\030\002 \003(\0132<.google.cloud.texttospeec" + + "h.v1beta1.MultispeakerPrebuiltVoiceB\003\340A\002\"\246\002\n" + "\016SynthesisInput\022\016\n" + "\004text\030\001 \001(\tH\000\022\020\n" + "\006markup\030\005 \001(\tH\000\022\016\n" + "\004ssml\030\002 \001(\tH\000\022U\n" - + "\024multi_speaker_markup\030\004 \001(" - + "\01325.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\000\022\023\n" + + "\024multi_speaker_markup\030\004" + + " \001(\01325.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\000\022\023\n" + "\006prompt\030\006 \001(\tH\001\210\001\001\022[\n" - + "\025custom_pronunciations\030\003 \001(\01327.google." - + "cloud.texttospeech.v1beta1.CustomPronunciationsB\003\340A\001B\016\n" + + "\025custom_pronunciations\030\003" + + " \001(\01327.google.cloud.texttospeech.v1beta1.CustomPronunciationsB\003\340A\001B\016\n" + "\014input_sourceB\t\n" + "\007_prompt\"\242\003\n" + "\024VoiceSelectionParams\022\032\n\r" @@ -220,16 +253,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\002 \001(\t\022G\n" + "\013ssml_gender\030\003" + " \001(\01622.google.cloud.texttospeech.v1beta1.SsmlVoiceGender\022J\n" - + "\014custom_voice\030\004 \001(" - + "\01324.google.cloud.texttospeech.v1beta1.CustomVoiceParams\022M\n" - + "\013voice_clone\030\005 \001(\01323.g" - + "oogle.cloud.texttospeech.v1beta1.VoiceCloneParamsB\003\340A\001\022\027\n\n" + + "\014custom_voice\030\004" + + " \001(\01324.google.cloud.texttospeech.v1beta1.CustomVoiceParams\022M\n" + + "\013voice_clone\030\005" + + " \001(\01323.google.cloud.texttospeech.v1beta1.VoiceCloneParamsB\003\340A\001\022\027\n\n" + "model_name\030\006 \001(\tB\003\340A\001\022c\n" - + "\032multi_speaker_voice_config\030\007 \001(\0132:.go" - + "ogle.cloud.texttospeech.v1beta1.MultiSpeakerVoiceConfigB\003\340A\001\"\366\001\n" + + "\032multi_speaker_voice_config\030\007 \001(\0132:.google.cloud.texttospeec" + + "h.v1beta1.MultiSpeakerVoiceConfigB\003\340A\001\"\366\001\n" + "\013AudioConfig\022M\n" - + "\016audio_encoding\030\001" - + " \001(\01620.google.cloud.texttospeech.v1beta1.AudioEncodingB\003\340A\002\022\035\n\r" + + "\016audio_encoding\030\001 \001(\01620" + + ".google.cloud.texttospeech.v1beta1.AudioEncodingB\003\340A\002\022\035\n\r" + "speaking_rate\030\002 \001(\001B\006\340A\004\340A\001\022\025\n" + "\005pitch\030\003 \001(\001B\006\340A\004\340A\001\022\036\n" + "\016volume_gain_db\030\004 \001(\001B\006\340A\004\340A\001\022\036\n" @@ -238,8 +271,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021CustomVoiceParams\0222\n" + "\005model\030\001 \001(\tB#\340A\002\372A\035\n" + "\033automl.googleapis.com/Model\022a\n" - + "\016reported_usage\030\003 \001(\0162B.google.cloud.texttospeech.v1be" - + "ta1.CustomVoiceParams.ReportedUsageB\005\030\001\340A\001\"J\n\r" + + "\016reported_usage\030\003 \001(\0162B.google.cloud" + + ".texttospeech.v1beta1.CustomVoiceParams.ReportedUsageB\005\030\001\340A\001\"J\n\r" + "ReportedUsage\022\036\n" + "\032REPORTED_USAGE_UNSPECIFIED\020\000\022\014\n" + "\010REALTIME\020\001\022\013\n" @@ -249,36 +282,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030SynthesizeSpeechResponse\022\025\n\r" + "audio_content\030\001 \001(\014\022@\n\n" + "timepoints\030\002 \003(\0132,.google.cloud.texttospeech.v1beta1.Timepoint\022D\n" - + "\014audio_config\030\004 \001(\0132..google." - + "cloud.texttospeech.v1beta1.AudioConfig\"4\n" + + "\014audio_config\030\004" + + " \001(\0132..google.cloud.texttospeech.v1beta1.AudioConfig\"4\n" + "\tTimepoint\022\021\n" + "\tmark_name\030\004 \001(\t\022\024\n" + "\014time_seconds\030\003 \001(\001\"\244\001\n" + "\024StreamingAudioConfig\022M\n" - + "\016audio_encoding\030\001" - + " \001(\01620.google.cloud.texttospeech.v1beta1.AudioEncodingB\003\340A\002\022\036\n" + + "\016audio_encoding\030\001 \001(\0162" + + "0.google.cloud.texttospeech.v1beta1.AudioEncodingB\003\340A\002\022\036\n" + "\021sample_rate_hertz\030\002 \001(\005B\003\340A\001\022\035\n\r" - + "speaking_rate\030\003 \001(\001B\006\340A\004\340A\001\"\243\002\n" + + "speaking_rate\030\003 \001(\001B\006\340A\004\340A\001\"\241\003\n" + "\031StreamingSynthesizeConfig\022K\n" - + "\005voice\030\001 \001(\01327.google.cloud." - + "texttospeech.v1beta1.VoiceSelectionParamsB\003\340A\002\022\\\n" - + "\026streaming_audio_config\030\004 \001(\01327" - + ".google.cloud.texttospeech.v1beta1.StreamingAudioConfigB\003\340A\001\022[\n" - + "\025custom_pronunciations\030\005" - + " \001(\01327.google.cloud.texttospeech.v1beta1.CustomPronunciationsB\003\340A\001\"\302\001\n" + + "\005voice\030\001 \001" + + "(\01327.google.cloud.texttospeech.v1beta1.VoiceSelectionParamsB\003\340A\002\022\\\n" + + "\026streaming_audio_config\030\004 \001(\01327.google.cloud.texttosp" + + "eech.v1beta1.StreamingAudioConfigB\003\340A\001\022[\n" + + "\025custom_pronunciations\030\005 \001(\01327.google.c" + + "loud.texttospeech.v1beta1.CustomPronunciationsB\003\340A\001\022a\n" + + "\026advanced_voice_options\030\007 " + + "\001(\01327.google.cloud.texttospeech.v1beta1.AdvancedVoiceOptionsB\003\340A\001H\000\210\001\001B\031\n" + + "\027_advanced_voice_options\"\302\001\n" + "\027StreamingSynthesisInput\022\016\n" + "\004text\030\001 \001(\tH\000\022\020\n" + "\006markup\030\005 \001(\tH\000\022U\n" - + "\024multi_speaker_markup\030\007" - + " \001(\01325.google.cloud.texttospeech.v1beta1.MultiSpeakerMarkupH\000\022\023\n" + + "\024multi_speaker_markup\030\007 \001(\01325.google.c" + + "loud.texttospeech.v1beta1.MultiSpeakerMarkupH\000\022\023\n" + "\006prompt\030\006 \001(\tH\001\210\001\001B\016\n" + "\014input_sourceB\t\n" + "\007_prompt\"\330\001\n" + "\032StreamingSynthesizeRequest\022X\n" - + "\020streaming_config\030\001" - + " \001(\0132<.google.cloud.texttospeech.v1beta1.StreamingSynthesizeConfigH\000\022K\n" - + "\005input\030\002" - + " \001(\0132:.google.cloud.texttospeech.v1beta1.StreamingSynthesisInputH\000B\023\n" + + "\020streaming_config\030\001 \001(\0132<.google" + + ".cloud.texttospeech.v1beta1.StreamingSynthesizeConfigH\000\022K\n" + + "\005input\030\002 \001(\0132:.google." + + "cloud.texttospeech.v1beta1.StreamingSynthesisInputH\000B\023\n" + "\021streaming_request\"4\n" + "\033StreamingSynthesizeResponse\022\025\n\r" + "audio_content\030\001 \001(\014*W\n" @@ -298,26 +334,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003PCM\020\007\022\007\n" + "\003M4A\020\0102\357\004\n" + "\014TextToSpeech\022\242\001\n\n" - + "ListVoices\0224.google.cloud.texttospeech.v1be" - + "ta1.ListVoicesRequest\0325.google.cloud.tex" - + "ttospeech.v1beta1.ListVoicesResponse\"\'\332A\r" + + "ListVoices\0224.google.cloud.texttospeech.v1beta1.ListVoicesRe" + + "quest\0325.google.cloud.texttospeech.v1beta1.ListVoicesResponse\"\'\332A\r" + "language_code\202\323\344\223\002\021\022\017/v1beta1/voices\022\313\001\n" - + "\020SynthesizeSpeech\022:.google.cloud.textto" - + "speech.v1beta1.SynthesizeSpeechRequest\032;.google.cloud.texttospeech.v1beta1.Synth" - + "esizeSpeechResponse\">\332A\030input,voice,audi" - + "o_config\202\323\344\223\002\035\"\030/v1beta1/text:synthesize:\001*\022\232\001\n" - + "\023StreamingSynthesize\022=.google.cloud.texttospeech.v1beta1.StreamingSynthes" - + "izeRequest\032>.google.cloud.texttospeech.v" - + "1beta1.StreamingSynthesizeResponse\"\000(\0010\001" - + "\032O\312A\033texttospeech.googleapis.com\322A.https" - + "://www.googleapis.com/auth/cloud-platformB\325\002\n" - + "%com.google.cloud.texttospeech.v1beta1B\021TextToSpeechProtoP\001ZIcloud.google.c" - + "om/go/texttospeech/apiv1beta1/texttospee" - + "chpb;texttospeechpb\242\002\004CTTS\252\002!Google.Clou" - + "d.TextToSpeech.V1Beta1\312\002!Google\\Cloud\\Te" - + "xtToSpeech\\V1beta1\352\002$Google::Cloud::TextToSpeech::V1beta1\352AU\n" - + "\033automl.googleapis.com/Model\0226projects/{project}/locations/" - + "{location}/models/{model}b\006proto3" + + "\020SynthesizeSpeech\022:.google.cloud.texttospeech.v1beta1.S" + + "ynthesizeSpeechRequest\032;.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRespo" + + "nse\">\332A\030input,voice,audio_config\202\323\344\223\002\035\"\030/v1beta1/text:synthesize:\001*\022\232\001\n" + + "\023StreamingSynthesize\022=.google.cloud.texttospeech." + + "v1beta1.StreamingSynthesizeRequest\032>.google.cloud.texttospeech.v1beta1.Streaming" + + "SynthesizeResponse\"\000(\0010\001\032O\312A\033texttospeec" + + "h.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\325\002\n" + + "%com.google.cloud.texttospeech.v1beta1B\021TextToSpeec" + + "hProtoP\001ZIcloud.google.com/go/texttospeech/apiv1beta1/texttospeechpb;texttospeec" + + "hpb\242\002\004CTTS\252\002!Google.Cloud.TextToSpeech.V" + + "1Beta1\312\002!Google\\Cloud\\TextToSpeech\\V1bet" + + "a1\352\002$Google::Cloud::TextToSpeech::V1beta1\352AU\n" + + "\033automl.googleapis.com/Model\0226projects/{project}/locations/{location}/model" + + "s/{model}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -358,7 +391,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_descriptor, new java.lang.String[] { - "LowLatencyJourneySynthesis", "RelaxSafetyFilters", + "LowLatencyJourneySynthesis", + "RelaxSafetyFilters", + "SafetySettings", + "EnableTextnorm", + }); + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_descriptor = + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_descriptor + .getNestedType(0); + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySetting_descriptor, + new java.lang.String[] { + "Category", "Threshold", + }); + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_descriptor = + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_descriptor + .getNestedType(1); + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_texttospeech_v1beta1_AdvancedVoiceOptions_SafetySettings_descriptor, + new java.lang.String[] { + "Settings", }); internal_static_google_cloud_texttospeech_v1beta1_SynthesizeSpeechRequest_descriptor = getDescriptor().getMessageType(4); @@ -504,7 +558,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_texttospeech_v1beta1_StreamingSynthesizeConfig_descriptor, new java.lang.String[] { - "Voice", "StreamingAudioConfig", "CustomPronunciations", + "Voice", "StreamingAudioConfig", "CustomPronunciations", "AdvancedVoiceOptions", }); internal_static_google_cloud_texttospeech_v1beta1_StreamingSynthesisInput_descriptor = getDescriptor().getMessageType(19); diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts.proto b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts.proto index 066043418712..d13736651fcf 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts.proto +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts.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. @@ -164,18 +164,85 @@ message Voice { // Used for advanced voice options. message AdvancedVoiceOptions { + // Safety setting for a single harm category. + message SafetySetting { + // The harm category to apply the safety setting to. + HarmCategory category = 1; + + // The harm block threshold for the safety setting. + HarmBlockThreshold threshold = 2; + } + + // Safety settings for the request. + message SafetySettings { + // The safety settings for the request. + repeated SafetySetting settings = 1; + } + + // Harm categories that will block the content. + enum HarmCategory { + // Default value. This value is unused. + HARM_CATEGORY_UNSPECIFIED = 0; + + // Content that promotes violence or incites hatred against individuals or + // groups based on certain attributes. + HARM_CATEGORY_HATE_SPEECH = 1; + + // Content that promotes, facilitates, or enables dangerous activities. + HARM_CATEGORY_DANGEROUS_CONTENT = 2; + + // Abusive, threatening, or content intended to bully, torment, or ridicule. + HARM_CATEGORY_HARASSMENT = 3; + + // Content that contains sexually explicit material. + HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + } + + // Harm block thresholds for the safety settings. + enum HarmBlockThreshold { + // The harm block threshold is unspecified. + HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + + // Block content with a low harm probability or higher. + BLOCK_LOW_AND_ABOVE = 1; + + // Block content with a medium harm probability or higher. + BLOCK_MEDIUM_AND_ABOVE = 2; + + // Block content with a high harm probability. + BLOCK_ONLY_HIGH = 3; + + // Do not block any content, regardless of its harm probability. + BLOCK_NONE = 4; + + // Turn off the safety filter entirely. + OFF = 5; + } + // Only for Journey voices. If false, the synthesis is context aware // and has a higher latency. optional bool low_latency_journey_synthesis = 1; - // Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only - // supported for accounts linked to Invoiced (Offline) Cloud billing accounts. - // Otherwise, will return result - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + // Optional. Input only. Deprecated, use safety_settings instead. + // If true, relaxes safety filters for Gemini TTS. bool relax_safety_filters = 8 [ + deprecated = true, (google.api.field_behavior) = INPUT_ONLY, (google.api.field_behavior) = OPTIONAL ]; + + // Optional. Input only. This applies to Gemini TTS only. If set, the category + // specified in the safety setting will be blocked if the harm probability is + // above the threshold. Otherwise, the safety filter will be disabled by + // default. + SafetySettings safety_settings = 9 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If true, textnorm will be applied to text input. This feature is + // enabled by default. Only applies for Gemini TTS. + optional bool enable_textnorm = 2 [(google.api.field_behavior) = OPTIONAL]; } // The top-level message sent by the client for the `SynthesizeSpeech` method. @@ -201,8 +268,9 @@ message SynthesizeSpeechRequest { // Whether and what timepoints are returned in the response. repeated TimepointType enable_time_pointing = 4; - // Advanced voice options. - optional AdvancedVoiceOptions advanced_voice_options = 8; + // Optional. Advanced voice options. + optional AdvancedVoiceOptions advanced_voice_options = 8 + [(google.api.field_behavior) = OPTIONAL]; } // Pronunciation customization for a phrase. @@ -311,8 +379,8 @@ message SynthesisInput { // The raw text to be synthesized. string text = 1; - // Markup for HD voices specifically. This field may not be used with any - // other voices. + // Markup for Chirp 3: HD voices specifically. This field may not be used + // with any other voices. string markup = 5; // The SSML document to be synthesized. The SSML document must be valid @@ -554,6 +622,10 @@ message StreamingSynthesizeConfig { // be inside a phoneme tag. CustomPronunciations custom_pronunciations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Advanced voice options. + optional AdvancedVoiceOptions advanced_voice_options = 7 + [(google.api.field_behavior) = OPTIONAL]; } // Input to be synthesized. @@ -564,8 +636,8 @@ message StreamingSynthesisInput { // in the output audio. string text = 1; - // Markup for HD voices specifically. This field may not be used with any - // other voices. + // Markup for Chirp 3: HD voices specifically. This field may not be used + // with any other voices. string markup = 5; // Multi-speaker markup for Gemini TTS. This field may not diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto index 4fe7d56130a3..4b8a9c012e3c 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/proto/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.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-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/MemorystoreClient.java b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/MemorystoreClient.java index 8c77a3b7a4d2..0057da86ac86 100644 --- a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/MemorystoreClient.java +++ b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/MemorystoreClient.java @@ -190,6 +190,25 @@ * * * + *

GetSharedRegionalCertificateAuthority + *

Gets the details of shared regional certificate authority information for Memorystore instance. + * + *

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

+ *
    + *
  • getSharedRegionalCertificateAuthority(GetSharedRegionalCertificateAuthorityRequest request) + *

+ *

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

+ *
    + *
  • getSharedRegionalCertificateAuthority(SharedRegionalCertificateAuthorityName name) + *

  • getSharedRegionalCertificateAuthority(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.

+ *
    + *
  • getSharedRegionalCertificateAuthorityCallable() + *

+ * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -1169,6 +1188,133 @@ public final CertificateAuthority getCertificateAuthority( return stub.getCertificateAuthorityCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of shared regional certificate authority information for Memorystore instance. + * + *

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 (MemorystoreClient memorystoreClient = MemorystoreClient.create()) {
+   *   SharedRegionalCertificateAuthorityName name =
+   *       SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]");
+   *   SharedRegionalCertificateAuthority response =
+   *       memorystoreClient.getSharedRegionalCertificateAuthority(name);
+   * }
+   * }
+ * + * @param name Required. Regional certificate authority resource name using the form: + * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` where + * `location_id` refers to a Google Cloud region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SharedRegionalCertificateAuthority getSharedRegionalCertificateAuthority( + SharedRegionalCertificateAuthorityName name) { + GetSharedRegionalCertificateAuthorityRequest request = + GetSharedRegionalCertificateAuthorityRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getSharedRegionalCertificateAuthority(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of shared regional certificate authority information for Memorystore instance. + * + *

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 (MemorystoreClient memorystoreClient = MemorystoreClient.create()) {
+   *   String name = SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString();
+   *   SharedRegionalCertificateAuthority response =
+   *       memorystoreClient.getSharedRegionalCertificateAuthority(name);
+   * }
+   * }
+ * + * @param name Required. Regional certificate authority resource name using the form: + * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` where + * `location_id` refers to a Google Cloud region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SharedRegionalCertificateAuthority getSharedRegionalCertificateAuthority( + String name) { + GetSharedRegionalCertificateAuthorityRequest request = + GetSharedRegionalCertificateAuthorityRequest.newBuilder().setName(name).build(); + return getSharedRegionalCertificateAuthority(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of shared regional certificate authority information for Memorystore instance. + * + *

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 (MemorystoreClient memorystoreClient = MemorystoreClient.create()) {
+   *   GetSharedRegionalCertificateAuthorityRequest request =
+   *       GetSharedRegionalCertificateAuthorityRequest.newBuilder()
+   *           .setName(
+   *               SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   SharedRegionalCertificateAuthority response =
+   *       memorystoreClient.getSharedRegionalCertificateAuthority(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 SharedRegionalCertificateAuthority getSharedRegionalCertificateAuthority( + GetSharedRegionalCertificateAuthorityRequest request) { + return getSharedRegionalCertificateAuthorityCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of shared regional certificate authority information for Memorystore instance. + * + *

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 (MemorystoreClient memorystoreClient = MemorystoreClient.create()) {
+   *   GetSharedRegionalCertificateAuthorityRequest request =
+   *       GetSharedRegionalCertificateAuthorityRequest.newBuilder()
+   *           .setName(
+   *               SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       memorystoreClient.getSharedRegionalCertificateAuthorityCallable().futureCall(request);
+   *   // Do something.
+   *   SharedRegionalCertificateAuthority response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthorityCallable() { + return stub.getSharedRegionalCertificateAuthorityCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/MemorystoreSettings.java b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/MemorystoreSettings.java index e16e05c82d5c..5807fe10ea0e 100644 --- a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/MemorystoreSettings.java +++ b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/MemorystoreSettings.java @@ -170,6 +170,16 @@ public UnaryCallSettings deleteInstanceSetting return ((MemorystoreStubSettings) getStubSettings()).getCertificateAuthoritySettings(); } + /** + * Returns the object with the settings used for calls to getSharedRegionalCertificateAuthority. + */ + public UnaryCallSettings< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthoritySettings() { + return ((MemorystoreStubSettings) getStubSettings()) + .getSharedRegionalCertificateAuthoritySettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -328,6 +338,15 @@ public UnaryCallSettings.Builder deleteInstanc return getStubSettingsBuilder().getCertificateAuthoritySettings(); } + /** + * Returns the builder for the settings used for calls to getSharedRegionalCertificateAuthority. + */ + public UnaryCallSettings.Builder< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthoritySettings() { + return getStubSettingsBuilder().getSharedRegionalCertificateAuthoritySettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/gapic_metadata.json b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/gapic_metadata.json index 9a898c2a60af..3d5393eaef3c 100644 --- a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/gapic_metadata.json +++ b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/gapic_metadata.json @@ -25,6 +25,9 @@ "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, + "GetSharedRegionalCertificateAuthority": { + "methods": ["getSharedRegionalCertificateAuthority", "getSharedRegionalCertificateAuthority", "getSharedRegionalCertificateAuthority", "getSharedRegionalCertificateAuthorityCallable"] + }, "ListInstances": { "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] }, diff --git a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/HttpJsonMemorystoreStub.java b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/HttpJsonMemorystoreStub.java index 17593c79bf75..d8afabf19b5f 100644 --- a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/HttpJsonMemorystoreStub.java +++ b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/HttpJsonMemorystoreStub.java @@ -45,10 +45,12 @@ import com.google.cloud.memorystore.v1beta.DeleteInstanceRequest; import com.google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest; import com.google.cloud.memorystore.v1beta.GetInstanceRequest; +import com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest; import com.google.cloud.memorystore.v1beta.Instance; import com.google.cloud.memorystore.v1beta.ListInstancesRequest; import com.google.cloud.memorystore.v1beta.ListInstancesResponse; import com.google.cloud.memorystore.v1beta.OperationMetadata; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority; import com.google.cloud.memorystore.v1beta.UpdateInstanceRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; @@ -308,6 +310,45 @@ public class HttpJsonMemorystoreStub extends MemorystoreStub { .build()) .build(); + private static final ApiMethodDescriptor< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthorityMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.memorystore.v1beta.Memorystore/GetSharedRegionalCertificateAuthority") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}", + 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(SharedRegionalCertificateAuthority.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -391,6 +432,9 @@ public class HttpJsonMemorystoreStub extends MemorystoreStub { deleteInstanceOperationCallable; private final UnaryCallable getCertificateAuthorityCallable; + private final UnaryCallable< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthorityCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -538,6 +582,22 @@ protected HttpJsonMemorystoreStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + HttpJsonCallSettings< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthorityTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(getSharedRegionalCertificateAuthorityMethodDescriptor) + .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() @@ -603,6 +663,11 @@ protected HttpJsonMemorystoreStub( getCertificateAuthorityTransportSettings, settings.getCertificateAuthoritySettings(), clientContext); + this.getSharedRegionalCertificateAuthorityCallable = + callableFactory.createUnaryCallable( + getSharedRegionalCertificateAuthorityTransportSettings, + settings.getSharedRegionalCertificateAuthoritySettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -626,6 +691,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(updateInstanceMethodDescriptor); methodDescriptors.add(deleteInstanceMethodDescriptor); methodDescriptors.add(getCertificateAuthorityMethodDescriptor); + methodDescriptors.add(getSharedRegionalCertificateAuthorityMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -690,6 +756,13 @@ public UnaryCallable deleteInstanceCallable() return getCertificateAuthorityCallable; } + @Override + public UnaryCallable< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthorityCallable() { + return getSharedRegionalCertificateAuthorityCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/MemorystoreStub.java b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/MemorystoreStub.java index 06822c54e66a..0d069c6539a1 100644 --- a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/MemorystoreStub.java +++ b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/MemorystoreStub.java @@ -33,10 +33,12 @@ import com.google.cloud.memorystore.v1beta.DeleteInstanceRequest; import com.google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest; import com.google.cloud.memorystore.v1beta.GetInstanceRequest; +import com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest; import com.google.cloud.memorystore.v1beta.Instance; import com.google.cloud.memorystore.v1beta.ListInstancesRequest; import com.google.cloud.memorystore.v1beta.ListInstancesResponse; import com.google.cloud.memorystore.v1beta.OperationMetadata; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority; import com.google.cloud.memorystore.v1beta.UpdateInstanceRequest; import com.google.longrunning.Operation; import com.google.protobuf.Empty; @@ -101,6 +103,13 @@ public UnaryCallable deleteInstanceCallable() throw new UnsupportedOperationException("Not implemented: getCertificateAuthorityCallable()"); } + public UnaryCallable< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthorityCallable() { + throw new UnsupportedOperationException( + "Not implemented: getSharedRegionalCertificateAuthorityCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/MemorystoreStubSettings.java b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/MemorystoreStubSettings.java index 75d4196175aa..823a03c08689 100644 --- a/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/MemorystoreStubSettings.java +++ b/java-valkey/google-cloud-valkey/src/main/java/com/google/cloud/memorystore/v1beta/stub/MemorystoreStubSettings.java @@ -56,10 +56,12 @@ import com.google.cloud.memorystore.v1beta.DeleteInstanceRequest; import com.google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest; import com.google.cloud.memorystore.v1beta.GetInstanceRequest; +import com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest; import com.google.cloud.memorystore.v1beta.Instance; import com.google.cloud.memorystore.v1beta.ListInstancesRequest; import com.google.cloud.memorystore.v1beta.ListInstancesResponse; import com.google.cloud.memorystore.v1beta.OperationMetadata; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority; import com.google.cloud.memorystore.v1beta.UpdateInstanceRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -171,6 +173,9 @@ public class MemorystoreStubSettings extends StubSettings getCertificateAuthoritySettings; + private final UnaryCallSettings< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthoritySettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -328,6 +333,15 @@ public UnaryCallSettings deleteInstanceSetting return getCertificateAuthoritySettings; } + /** + * Returns the object with the settings used for calls to getSharedRegionalCertificateAuthority. + */ + public UnaryCallSettings< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthoritySettings() { + return getSharedRegionalCertificateAuthoritySettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -430,6 +444,8 @@ protected MemorystoreStubSettings(Builder settingsBuilder) throws IOException { deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); getCertificateAuthoritySettings = settingsBuilder.getCertificateAuthoritySettings().build(); + getSharedRegionalCertificateAuthoritySettings = + settingsBuilder.getSharedRegionalCertificateAuthoritySettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -464,6 +480,9 @@ public static class Builder extends StubSettings.Builder getCertificateAuthoritySettings; + private final UnaryCallSettings.Builder< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthoritySettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -528,6 +547,8 @@ protected Builder(ClientContext clientContext) { deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); getCertificateAuthoritySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSharedRegionalCertificateAuthoritySettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -539,6 +560,7 @@ protected Builder(ClientContext clientContext) { updateInstanceSettings, deleteInstanceSettings, getCertificateAuthoritySettings, + getSharedRegionalCertificateAuthoritySettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -556,6 +578,8 @@ protected Builder(MemorystoreStubSettings settings) { deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); getCertificateAuthoritySettings = settings.getCertificateAuthoritySettings.toBuilder(); + getSharedRegionalCertificateAuthoritySettings = + settings.getSharedRegionalCertificateAuthoritySettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -567,6 +591,7 @@ protected Builder(MemorystoreStubSettings settings) { updateInstanceSettings, deleteInstanceSettings, getCertificateAuthoritySettings, + getSharedRegionalCertificateAuthoritySettings, listLocationsSettings, getLocationSettings); } @@ -614,6 +639,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 + .getSharedRegionalCertificateAuthoritySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -765,6 +795,15 @@ public UnaryCallSettings.Builder deleteInstanc return getCertificateAuthoritySettings; } + /** + * Returns the builder for the settings used for calls to getSharedRegionalCertificateAuthority. + */ + public UnaryCallSettings.Builder< + GetSharedRegionalCertificateAuthorityRequest, SharedRegionalCertificateAuthority> + getSharedRegionalCertificateAuthoritySettings() { + return getSharedRegionalCertificateAuthoritySettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-valkey/google-cloud-valkey/src/main/resources/META-INF/native-image/com.google.cloud.memorystore.v1beta/reflect-config.json b/java-valkey/google-cloud-valkey/src/main/resources/META-INF/native-image/com.google.cloud.memorystore.v1beta/reflect-config.json index 30447ade5c94..59e33be0fcd9 100644 --- a/java-valkey/google-cloud-valkey/src/main/resources/META-INF/native-image/com.google.cloud.memorystore.v1beta/reflect-config.json +++ b/java-valkey/google-cloud-valkey/src/main/resources/META-INF/native-image/com.google.cloud.memorystore.v1beta/reflect-config.json @@ -746,6 +746,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.memorystore.v1beta.Instance", "queryAllDeclaredConstructors": true, @@ -827,6 +845,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.memorystore.v1beta.Instance$ServerCaMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.memorystore.v1beta.Instance$State", "queryAllDeclaredConstructors": true, @@ -1079,6 +1106,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority$RegionalManagedCertificateAuthority", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority$RegionalManagedCertificateAuthority$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority$RegionalManagedCertificateAuthority$RegionalCertChain", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority$RegionalManagedCertificateAuthority$RegionalCertChain$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.memorystore.v1beta.UpdateInstanceRequest", "queryAllDeclaredConstructors": true, diff --git a/java-valkey/google-cloud-valkey/src/test/java/com/google/cloud/memorystore/v1beta/MemorystoreClientTest.java b/java-valkey/google-cloud-valkey/src/test/java/com/google/cloud/memorystore/v1beta/MemorystoreClientTest.java index f0e2b2a8e05e..0676f43873e7 100644 --- a/java-valkey/google-cloud-valkey/src/test/java/com/google/cloud/memorystore/v1beta/MemorystoreClientTest.java +++ b/java-valkey/google-cloud-valkey/src/test/java/com/google/cloud/memorystore/v1beta/MemorystoreClientTest.java @@ -209,6 +209,8 @@ public void getInstanceTest() throws Exception { .setDeletionProtectionEnabled(true) .addAllPscAutoConnections(new ArrayList()) .addAllEndpoints(new ArrayList()) + .setServerCaPool("serverCaPool1433802429") + .setRotateServerCertificate(true) .build(); mockService.addResponse(expectedResponse); @@ -269,6 +271,8 @@ public void getInstanceTest2() throws Exception { .setDeletionProtectionEnabled(true) .addAllPscAutoConnections(new ArrayList()) .addAllEndpoints(new ArrayList()) + .setServerCaPool("serverCaPool1433802429") + .setRotateServerCertificate(true) .build(); mockService.addResponse(expectedResponse); @@ -329,6 +333,8 @@ public void createInstanceTest() throws Exception { .setDeletionProtectionEnabled(true) .addAllPscAutoConnections(new ArrayList()) .addAllEndpoints(new ArrayList()) + .setServerCaPool("serverCaPool1433802429") + .setRotateServerCertificate(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -398,6 +404,8 @@ public void createInstanceTest2() throws Exception { .setDeletionProtectionEnabled(true) .addAllPscAutoConnections(new ArrayList()) .addAllEndpoints(new ArrayList()) + .setServerCaPool("serverCaPool1433802429") + .setRotateServerCertificate(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -467,6 +475,8 @@ public void updateInstanceTest() throws Exception { .setDeletionProtectionEnabled(true) .addAllPscAutoConnections(new ArrayList()) .addAllEndpoints(new ArrayList()) + .setServerCaPool("serverCaPool1433802429") + .setRotateServerCertificate(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -495,6 +505,8 @@ public void updateInstanceTest() throws Exception { .setDeletionProtectionEnabled(true) .addAllPscAutoConnections(new ArrayList()) .addAllEndpoints(new ArrayList()) + .setServerCaPool("serverCaPool1433802429") + .setRotateServerCertificate(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -543,6 +555,8 @@ public void updateInstanceExceptionTest() throws Exception { .setDeletionProtectionEnabled(true) .addAllPscAutoConnections(new ArrayList()) .addAllEndpoints(new ArrayList()) + .setServerCaPool("serverCaPool1433802429") + .setRotateServerCertificate(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateInstanceAsync(instance, updateMask).get(); @@ -725,6 +739,101 @@ public void getCertificateAuthorityExceptionTest2() throws Exception { } } + @Test + public void getSharedRegionalCertificateAuthorityTest() throws Exception { + SharedRegionalCertificateAuthority expectedResponse = + SharedRegionalCertificateAuthority.newBuilder() + .setName( + SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + SharedRegionalCertificateAuthorityName name = + SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]"); + + SharedRegionalCertificateAuthority actualResponse = + client.getSharedRegionalCertificateAuthority(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 getSharedRegionalCertificateAuthorityExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SharedRegionalCertificateAuthorityName name = + SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]"); + client.getSharedRegionalCertificateAuthority(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSharedRegionalCertificateAuthorityTest2() throws Exception { + SharedRegionalCertificateAuthority expectedResponse = + SharedRegionalCertificateAuthority.newBuilder() + .setName( + SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-693/locations/location-693/sharedRegionalCertificateAuthority"; + + SharedRegionalCertificateAuthority actualResponse = + client.getSharedRegionalCertificateAuthority(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 getSharedRegionalCertificateAuthorityExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-693/locations/location-693/sharedRegionalCertificateAuthority"; + client.getSharedRegionalCertificateAuthority(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/GetSharedRegionalCertificateAuthorityRequest.java b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/GetSharedRegionalCertificateAuthorityRequest.java new file mode 100644 index 000000000000..25642c261400 --- /dev/null +++ b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/GetSharedRegionalCertificateAuthorityRequest.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/memorystore/v1beta/memorystore.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.memorystore.v1beta; + +/** + * + * + *
+ * Request for
+ * [GetSharedRegionalCertificateAuthority][google.cloud.memorystore.v1beta.Memorystore.GetSharedRegionalCertificateAuthority].
+ * 
+ * + * Protobuf type {@code + * google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest} + */ +@com.google.protobuf.Generated +public final class GetSharedRegionalCertificateAuthorityRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest) + GetSharedRegionalCertificateAuthorityRequestOrBuilder { + 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= */ "", + "GetSharedRegionalCertificateAuthorityRequest"); + } + + // Use GetSharedRegionalCertificateAuthorityRequest.newBuilder() to construct. + private GetSharedRegionalCertificateAuthorityRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetSharedRegionalCertificateAuthorityRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_GetSharedRegionalCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_GetSharedRegionalCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest.class, + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Regional certificate authority resource name using the form:
+   * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+   * where `location_id` refers to a Google Cloud region.
+   * 
+ * + * + * 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. Regional certificate authority resource name using the form:
+   * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+   * where `location_id` refers to a Google Cloud region.
+   * 
+ * + * + * 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest)) { + return super.equals(obj); + } + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest other = + (com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest) 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest 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
+   * [GetSharedRegionalCertificateAuthority][google.cloud.memorystore.v1beta.Memorystore.GetSharedRegionalCertificateAuthority].
+   * 
+ * + * Protobuf type {@code + * google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest) + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_GetSharedRegionalCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_GetSharedRegionalCertificateAuthorityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + .class, + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest.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.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_GetSharedRegionalCertificateAuthorityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + getDefaultInstanceForType() { + return com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + build() { + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + buildPartial() { + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest result = + new com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest) { + return mergeFrom( + (com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest other) { + if (other + == com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + .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. Regional certificate authority resource name using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * where `location_id` refers to a Google Cloud region.
+     * 
+ * + * + * 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. Regional certificate authority resource name using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * where `location_id` refers to a Google Cloud region.
+     * 
+ * + * + * 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. Regional certificate authority resource name using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * where `location_id` refers to a Google Cloud region.
+     * 
+ * + * + * 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. Regional certificate authority resource name using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * where `location_id` refers to a Google Cloud region.
+     * 
+ * + * + * 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. Regional certificate authority resource name using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * where `location_id` refers to a Google Cloud region.
+     * 
+ * + * + * 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest) + private static final com.google.cloud.memorystore.v1beta + .GetSharedRegionalCertificateAuthorityRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest(); + } + + public static com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSharedRegionalCertificateAuthorityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/GetSharedRegionalCertificateAuthorityRequestOrBuilder.java b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/GetSharedRegionalCertificateAuthorityRequestOrBuilder.java new file mode 100644 index 000000000000..c7fe65c7927c --- /dev/null +++ b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/GetSharedRegionalCertificateAuthorityRequestOrBuilder.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/memorystore/v1beta/memorystore.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.memorystore.v1beta; + +@com.google.protobuf.Generated +public interface GetSharedRegionalCertificateAuthorityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Regional certificate authority resource name using the form:
+   * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+   * where `location_id` refers to a Google Cloud region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Regional certificate authority resource name using the form:
+   * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+   * where `location_id` refers to a Google Cloud region.
+   * 
+ * + * + * 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-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/Instance.java b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/Instance.java index 206224ea230c..4f31587be98e 100644 --- a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/Instance.java +++ b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/Instance.java @@ -63,6 +63,8 @@ private Instance() { pscAutoConnections_ = java.util.Collections.emptyList(); endpoints_ = java.util.Collections.emptyList(); mode_ = 0; + serverCaMode_ = 0; + serverCaPool_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -1063,6 +1065,280 @@ private Mode(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.memorystore.v1beta.Instance.Mode) } + /** + * + * + *
+   * The Server CA mode for the instance.
+   * 
+ * + * Protobuf enum {@code google.cloud.memorystore.v1beta.Instance.ServerCaMode} + */ + public enum ServerCaMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Server CA mode not specified.
+     * 
+ * + * SERVER_CA_MODE_UNSPECIFIED = 0; + */ + SERVER_CA_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Each instance has its own Google-managed CA.
+     * 
+ * + * GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + */ + GOOGLE_MANAGED_PER_INSTANCE_CA(1), + /** + * + * + *
+     * The instance uses a Google-managed shared CA for the instance's region.
+     * 
+ * + * GOOGLE_MANAGED_SHARED_CA = 2; + */ + GOOGLE_MANAGED_SHARED_CA(2), + /** + * + * + *
+     * The instance uses a customer-managed CA from CAS.
+     * 
+ * + * CUSTOMER_MANAGED_CAS_CA = 3; + */ + CUSTOMER_MANAGED_CAS_CA(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ServerCaMode"); + } + + /** + * + * + *
+     * Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead.
+     * 
+ * + * SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 [deprecated = true]; + */ + public static final ServerCaMode SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = + GOOGLE_MANAGED_PER_INSTANCE_CA; + + /** + * + * + *
+     * Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead.
+     * 
+ * + * SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 [deprecated = true]; + */ + public static final ServerCaMode SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = + GOOGLE_MANAGED_SHARED_CA; + + /** + * + * + *
+     * Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead.
+     * 
+ * + * SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 [deprecated = true]; + */ + public static final ServerCaMode SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = + CUSTOMER_MANAGED_CAS_CA; + + /** + * + * + *
+     * Server CA mode not specified.
+     * 
+ * + * SERVER_CA_MODE_UNSPECIFIED = 0; + */ + public static final int SERVER_CA_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Each instance has its own Google-managed CA.
+     * 
+ * + * GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + */ + public static final int GOOGLE_MANAGED_PER_INSTANCE_CA_VALUE = 1; + + /** + * + * + *
+     * The instance uses a Google-managed shared CA for the instance's region.
+     * 
+ * + * GOOGLE_MANAGED_SHARED_CA = 2; + */ + public static final int GOOGLE_MANAGED_SHARED_CA_VALUE = 2; + + /** + * + * + *
+     * The instance uses a customer-managed CA from CAS.
+     * 
+ * + * CUSTOMER_MANAGED_CAS_CA = 3; + */ + public static final int CUSTOMER_MANAGED_CAS_CA_VALUE = 3; + + /** + * + * + *
+     * Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead.
+     * 
+ * + * SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 [deprecated = true]; + */ + @java.lang.Deprecated + public static final int SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA_VALUE = 1; + + /** + * + * + *
+     * Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead.
+     * 
+ * + * SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 [deprecated = true]; + */ + @java.lang.Deprecated public static final int SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA_VALUE = 2; + + /** + * + * + *
+     * Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead.
+     * 
+ * + * SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 [deprecated = true]; + */ + @java.lang.Deprecated public static final int SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA_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 ServerCaMode 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 ServerCaMode forNumber(int value) { + switch (value) { + case 0: + return SERVER_CA_MODE_UNSPECIFIED; + case 1: + return GOOGLE_MANAGED_PER_INSTANCE_CA; + case 2: + return GOOGLE_MANAGED_SHARED_CA; + case 3: + return CUSTOMER_MANAGED_CAS_CA; + 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 ServerCaMode findValueByNumber(int number) { + return ServerCaMode.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.memorystore.v1beta.Instance.getDescriptor().getEnumTypes().get(5); + } + + private static final ServerCaMode[] VALUES = getStaticValuesArray(); + + private static ServerCaMode[] getStaticValuesArray() { + return new ServerCaMode[] { + SERVER_CA_MODE_UNSPECIFIED, + GOOGLE_MANAGED_PER_INSTANCE_CA, + GOOGLE_MANAGED_SHARED_CA, + CUSTOMER_MANAGED_CAS_CA, + SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA, + SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA, + SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA, + }; + } + + public static ServerCaMode 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 ServerCaMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.memorystore.v1beta.Instance.ServerCaMode) + } + public interface StateInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.memorystore.v1beta.Instance.StateInfo) @@ -6286,36 +6562,217 @@ public com.google.cloud.memorystore.v1beta.Instance.Mode getMode() { return result == null ? com.google.cloud.memorystore.v1beta.Instance.Mode.UNRECOGNIZED : result; } - private byte memoizedIsInitialized = -1; + public static final int SERVER_CA_MODE_FIELD_NUMBER = 56; + private int serverCaMode_ = 0; + /** + * + * + *
+   * Optional. Immutable. The Server CA mode for the instance.
+   * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the serverCaMode field is set. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public boolean hasServerCaMode() { + return ((bitField0_ & 0x00000100) != 0); + } - memoizedIsInitialized = 1; - return true; + /** + * + * + *
+   * Optional. Immutable. The Server CA mode for the instance.
+   * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for serverCaMode. + */ + @java.lang.Override + public int getServerCaModeValue() { + return serverCaMode_; } + /** + * + * + *
+   * Optional. Immutable. The Server CA mode for the instance.
+   * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The serverCaMode. + */ @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, getUpdateTime()); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (state_ - != com.google.cloud.memorystore.v1beta.Instance.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, state_); - } - if (((bitField0_ & 0x00000004) != 0)) { + public com.google.cloud.memorystore.v1beta.Instance.ServerCaMode getServerCaMode() { + com.google.cloud.memorystore.v1beta.Instance.ServerCaMode result = + com.google.cloud.memorystore.v1beta.Instance.ServerCaMode.forNumber(serverCaMode_); + return result == null + ? com.google.cloud.memorystore.v1beta.Instance.ServerCaMode.UNRECOGNIZED + : result; + } + + public static final int SERVER_CA_POOL_FIELD_NUMBER = 57; + + @SuppressWarnings("serial") + private volatile java.lang.Object serverCaPool_ = ""; + + /** + * + * + *
+   * Optional. Immutable. The customer-managed CA pool for the instance. Only
+   * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+   * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+   * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the serverCaPool field is set. + */ + @java.lang.Override + public boolean hasServerCaPool() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Optional. Immutable. The customer-managed CA pool for the instance. Only
+   * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+   * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+   * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The serverCaPool. + */ + @java.lang.Override + public java.lang.String getServerCaPool() { + java.lang.Object ref = serverCaPool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverCaPool_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Immutable. The customer-managed CA pool for the instance. Only
+   * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+   * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+   * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serverCaPool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServerCaPoolBytes() { + java.lang.Object ref = serverCaPool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serverCaPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROTATE_SERVER_CERTIFICATE_FIELD_NUMBER = 58; + private boolean rotateServerCertificate_ = false; + + /** + * + * + *
+   * Optional. Input only. Rotate the server certificates.
+   * 
+ * + * + * optional bool rotate_server_certificate = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the rotateServerCertificate field is set. + */ + @java.lang.Override + public boolean hasRotateServerCertificate() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+   * Optional. Input only. Rotate the server certificates.
+   * 
+ * + * + * optional bool rotate_server_certificate = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The rotateServerCertificate. + */ + @java.lang.Override + public boolean getRotateServerCertificate() { + return rotateServerCertificate_; + } + + 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, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (state_ + != com.google.cloud.memorystore.v1beta.Instance.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(6, getStateInfo()); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { @@ -6373,6 +6830,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (mode_ != com.google.cloud.memorystore.v1beta.Instance.Mode.MODE_UNSPECIFIED.getNumber()) { output.writeEnum(26, mode_); } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeEnum(56, serverCaMode_); + } + if (((bitField0_ & 0x00000200) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 57, serverCaPool_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeBool(58, rotateServerCertificate_); + } getUnknownFields().writeTo(output); } @@ -6474,6 +6940,15 @@ public int getSerializedSize() { if (mode_ != com.google.cloud.memorystore.v1beta.Instance.Mode.MODE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(26, mode_); } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(56, serverCaMode_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(57, serverCaPool_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(58, rotateServerCertificate_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -6536,6 +7011,18 @@ public boolean equals(final java.lang.Object obj) { if (!getPscAutoConnectionsList().equals(other.getPscAutoConnectionsList())) return false; if (!getEndpointsList().equals(other.getEndpointsList())) return false; if (mode_ != other.mode_) return false; + if (hasServerCaMode() != other.hasServerCaMode()) return false; + if (hasServerCaMode()) { + if (serverCaMode_ != other.serverCaMode_) return false; + } + if (hasServerCaPool() != other.hasServerCaPool()) return false; + if (hasServerCaPool()) { + if (!getServerCaPool().equals(other.getServerCaPool())) return false; + } + if (hasRotateServerCertificate() != other.hasRotateServerCertificate()) return false; + if (hasRotateServerCertificate()) { + if (getRotateServerCertificate() != other.getRotateServerCertificate()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6617,6 +7104,18 @@ public int hashCode() { } hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; + if (hasServerCaMode()) { + hash = (37 * hash) + SERVER_CA_MODE_FIELD_NUMBER; + hash = (53 * hash) + serverCaMode_; + } + if (hasServerCaPool()) { + hash = (37 * hash) + SERVER_CA_POOL_FIELD_NUMBER; + hash = (53 * hash) + getServerCaPool().hashCode(); + } + if (hasRotateServerCertificate()) { + hash = (37 * hash) + ROTATE_SERVER_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRotateServerCertificate()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -6864,6 +7363,9 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00100000); mode_ = 0; + serverCaMode_ = 0; + serverCaPool_ = ""; + rotateServerCertificate_ = false; return this; } @@ -7005,6 +7507,18 @@ private void buildPartial0(com.google.cloud.memorystore.v1beta.Instance result) if (((from_bitField0_ & 0x00200000) != 0)) { result.mode_ = mode_; } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.serverCaMode_ = serverCaMode_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.serverCaPool_ = serverCaPool_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.rotateServerCertificate_ = rotateServerCertificate_; + to_bitField0_ |= 0x00000400; + } result.bitField0_ |= to_bitField0_; } @@ -7162,6 +7676,17 @@ public Builder mergeFrom(com.google.cloud.memorystore.v1beta.Instance other) { if (other.mode_ != 0) { setModeValue(other.getModeValue()); } + if (other.hasServerCaMode()) { + setServerCaModeValue(other.getServerCaModeValue()); + } + if (other.hasServerCaPool()) { + serverCaPool_ = other.serverCaPool_; + bitField0_ |= 0x00800000; + onChanged(); + } + if (other.hasRotateServerCertificate()) { + setRotateServerCertificate(other.getRotateServerCertificate()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -7363,6 +7888,24 @@ public Builder mergeFrom( bitField0_ |= 0x00200000; break; } // case 208 + case 448: + { + serverCaMode_ = input.readEnum(); + bitField0_ |= 0x00400000; + break; + } // case 448 + case 458: + { + serverCaPool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 458 + case 464: + { + rotateServerCertificate_ = input.readBool(); + bitField0_ |= 0x01000000; + break; + } // case 464 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -11442,6 +11985,362 @@ public Builder clearMode() { return this; } + private int serverCaMode_ = 0; + + /** + * + * + *
+     * Optional. Immutable. The Server CA mode for the instance.
+     * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the serverCaMode field is set. + */ + @java.lang.Override + public boolean hasServerCaMode() { + return ((bitField0_ & 0x00400000) != 0); + } + + /** + * + * + *
+     * Optional. Immutable. The Server CA mode for the instance.
+     * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for serverCaMode. + */ + @java.lang.Override + public int getServerCaModeValue() { + return serverCaMode_; + } + + /** + * + * + *
+     * Optional. Immutable. The Server CA mode for the instance.
+     * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for serverCaMode to set. + * @return This builder for chaining. + */ + public Builder setServerCaModeValue(int value) { + serverCaMode_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. The Server CA mode for the instance.
+     * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The serverCaMode. + */ + @java.lang.Override + public com.google.cloud.memorystore.v1beta.Instance.ServerCaMode getServerCaMode() { + com.google.cloud.memorystore.v1beta.Instance.ServerCaMode result = + com.google.cloud.memorystore.v1beta.Instance.ServerCaMode.forNumber(serverCaMode_); + return result == null + ? com.google.cloud.memorystore.v1beta.Instance.ServerCaMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Immutable. The Server CA mode for the instance.
+     * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The serverCaMode to set. + * @return This builder for chaining. + */ + public Builder setServerCaMode( + com.google.cloud.memorystore.v1beta.Instance.ServerCaMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00400000; + serverCaMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. The Server CA mode for the instance.
+     * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearServerCaMode() { + bitField0_ = (bitField0_ & ~0x00400000); + serverCaMode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object serverCaPool_ = ""; + + /** + * + * + *
+     * Optional. Immutable. The customer-managed CA pool for the instance. Only
+     * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+     * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+     * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the serverCaPool field is set. + */ + public boolean hasServerCaPool() { + return ((bitField0_ & 0x00800000) != 0); + } + + /** + * + * + *
+     * Optional. Immutable. The customer-managed CA pool for the instance. Only
+     * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+     * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+     * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The serverCaPool. + */ + public java.lang.String getServerCaPool() { + java.lang.Object ref = serverCaPool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverCaPool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Immutable. The customer-managed CA pool for the instance. Only
+     * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+     * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+     * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serverCaPool. + */ + public com.google.protobuf.ByteString getServerCaPoolBytes() { + java.lang.Object ref = serverCaPool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serverCaPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Immutable. The customer-managed CA pool for the instance. Only
+     * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+     * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+     * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The serverCaPool to set. + * @return This builder for chaining. + */ + public Builder setServerCaPool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serverCaPool_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. The customer-managed CA pool for the instance. Only
+     * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+     * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+     * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearServerCaPool() { + serverCaPool_ = getDefaultInstance().getServerCaPool(); + bitField0_ = (bitField0_ & ~0x00800000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. The customer-managed CA pool for the instance. Only
+     * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+     * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+     * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for serverCaPool to set. + * @return This builder for chaining. + */ + public Builder setServerCaPoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serverCaPool_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + private boolean rotateServerCertificate_; + + /** + * + * + *
+     * Optional. Input only. Rotate the server certificates.
+     * 
+ * + * + * optional bool rotate_server_certificate = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the rotateServerCertificate field is set. + */ + @java.lang.Override + public boolean hasRotateServerCertificate() { + return ((bitField0_ & 0x01000000) != 0); + } + + /** + * + * + *
+     * Optional. Input only. Rotate the server certificates.
+     * 
+ * + * + * optional bool rotate_server_certificate = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The rotateServerCertificate. + */ + @java.lang.Override + public boolean getRotateServerCertificate() { + return rotateServerCertificate_; + } + + /** + * + * + *
+     * Optional. Input only. Rotate the server certificates.
+     * 
+ * + * + * optional bool rotate_server_certificate = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The rotateServerCertificate to set. + * @return This builder for chaining. + */ + public Builder setRotateServerCertificate(boolean value) { + + rotateServerCertificate_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. Rotate the server certificates.
+     * 
+ * + * + * optional bool rotate_server_certificate = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRotateServerCertificate() { + bitField0_ = (bitField0_ & ~0x01000000); + rotateServerCertificate_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.memorystore.v1beta.Instance) } diff --git a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/InstanceOrBuilder.java b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/InstanceOrBuilder.java index 73b0c43cb8e9..1dbf935053bd 100644 --- a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/InstanceOrBuilder.java +++ b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/InstanceOrBuilder.java @@ -930,4 +930,130 @@ com.google.cloud.memorystore.v1beta.Instance.InstanceEndpointOrBuilder getEndpoi * @return The mode. */ com.google.cloud.memorystore.v1beta.Instance.Mode getMode(); + + /** + * + * + *
+   * Optional. Immutable. The Server CA mode for the instance.
+   * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the serverCaMode field is set. + */ + boolean hasServerCaMode(); + + /** + * + * + *
+   * Optional. Immutable. The Server CA mode for the instance.
+   * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for serverCaMode. + */ + int getServerCaModeValue(); + + /** + * + * + *
+   * Optional. Immutable. The Server CA mode for the instance.
+   * 
+ * + * + * optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The serverCaMode. + */ + com.google.cloud.memorystore.v1beta.Instance.ServerCaMode getServerCaMode(); + + /** + * + * + *
+   * Optional. Immutable. The customer-managed CA pool for the instance. Only
+   * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+   * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+   * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the serverCaPool field is set. + */ + boolean hasServerCaPool(); + + /** + * + * + *
+   * Optional. Immutable. The customer-managed CA pool for the instance. Only
+   * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+   * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+   * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The serverCaPool. + */ + java.lang.String getServerCaPool(); + + /** + * + * + *
+   * Optional. Immutable. The customer-managed CA pool for the instance. Only
+   * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format:
+   * "projects/{project}/locations/{region}/caPools/{ca_pool}".
+   * 
+ * + * + * optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serverCaPool. + */ + com.google.protobuf.ByteString getServerCaPoolBytes(); + + /** + * + * + *
+   * Optional. Input only. Rotate the server certificates.
+   * 
+ * + * + * optional bool rotate_server_certificate = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the rotateServerCertificate field is set. + */ + boolean hasRotateServerCertificate(); + + /** + * + * + *
+   * Optional. Input only. Rotate the server certificates.
+   * 
+ * + * + * optional bool rotate_server_certificate = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The rotateServerCertificate. + */ + boolean getRotateServerCertificate(); } diff --git a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthority.java b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthority.java new file mode 100644 index 000000000000..839f4901da34 --- /dev/null +++ b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthority.java @@ -0,0 +1,3112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/memorystore/v1beta/memorystore.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.memorystore.v1beta; + +/** + * + * + *
+ * Shared regional certificate authority for an instance.
+ * 
+ * + * Protobuf type {@code google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority} + */ +@com.google.protobuf.Generated +public final class SharedRegionalCertificateAuthority extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority) + SharedRegionalCertificateAuthorityOrBuilder { + 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= */ "", + "SharedRegionalCertificateAuthority"); + } + + // Use SharedRegionalCertificateAuthority.newBuilder() to construct. + private SharedRegionalCertificateAuthority( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SharedRegionalCertificateAuthority() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.class, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.Builder.class); + } + + public interface RegionalManagedCertificateAuthorityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + java.util.List< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain> + getCaCertsList(); + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + getCaCerts(int index); + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + int getCaCertsCount(); + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder> + getCaCertsOrBuilderList(); + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder + getCaCertsOrBuilder(int index); + } + + /** + * + * + *
+   * CA certificate chains for memorystore managed server authentication.
+   * 
+ * + * Protobuf type {@code + * google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority} + */ + public static final class RegionalManagedCertificateAuthority + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority) + RegionalManagedCertificateAuthorityOrBuilder { + 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= */ "", + "RegionalManagedCertificateAuthority"); + } + + // Use RegionalManagedCertificateAuthority.newBuilder() to construct. + private RegionalManagedCertificateAuthority( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RegionalManagedCertificateAuthority() { + caCerts_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.class, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.Builder.class); + } + + public interface RegionalCertChainOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * repeated string certificates = 1; + * + * @return A list containing the certificates. + */ + java.util.List getCertificatesList(); + + /** + * + * + *
+       * The certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * repeated string certificates = 1; + * + * @return The count of certificates. + */ + int getCertificatesCount(); + + /** + * + * + *
+       * The certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * repeated string certificates = 1; + * + * @param index The index of the element to return. + * @return The certificates at the given index. + */ + java.lang.String getCertificates(int index); + + /** + * + * + *
+       * The certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * repeated string certificates = 1; + * + * @param index The index of the value to return. + * @return The bytes of the certificates at the given index. + */ + com.google.protobuf.ByteString getCertificatesBytes(int index); + } + + /** + * + * + *
+     * The certificates that form the CA chain, from leaf to root order.
+     * 
+ * + * Protobuf type {@code + * google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain} + */ + public static final class RegionalCertChain extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain) + RegionalCertChainOrBuilder { + 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= */ "", + "RegionalCertChain"); + } + + // Use RegionalCertChain.newBuilder() to construct. + private RegionalCertChain(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RegionalCertChain() { + certificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_RegionalCertChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_RegionalCertChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.class, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder.class); + } + + public static final int CERTIFICATES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList certificates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+       * The certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * repeated string certificates = 1; + * + * @return A list containing the certificates. + */ + public com.google.protobuf.ProtocolStringList getCertificatesList() { + return certificates_; + } + + /** + * + * + *
+       * The certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * repeated string certificates = 1; + * + * @return The count of certificates. + */ + public int getCertificatesCount() { + return certificates_.size(); + } + + /** + * + * + *
+       * The certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * repeated string certificates = 1; + * + * @param index The index of the element to return. + * @return The certificates at the given index. + */ + public java.lang.String getCertificates(int index) { + return certificates_.get(index); + } + + /** + * + * + *
+       * The certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * repeated string certificates = 1; + * + * @param index The index of the value to return. + * @return The bytes of the certificates at the given index. + */ + public com.google.protobuf.ByteString getCertificatesBytes(int index) { + return certificates_.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 < certificates_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, certificates_.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 < certificates_.size(); i++) { + dataSize += computeStringSizeNoTag(certificates_.getRaw(i)); + } + size += dataSize; + size += 1 * getCertificatesList().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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain)) { + return super.equals(obj); + } + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + other = + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain) + obj; + + if (!getCertificatesList().equals(other.getCertificatesList())) 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 (getCertificatesCount() > 0) { + hash = (37 * hash) + CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getCertificatesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + 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 certificates that form the CA chain, from leaf to root order.
+       * 
+ * + * Protobuf type {@code + * google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain) + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_RegionalCertChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_RegionalCertChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.class, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder.class); + } + + // Construct using + // com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + certificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_RegionalCertChain_descriptor; + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + getDefaultInstanceForType() { + return com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + build() { + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + buildPartial() { + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + result = + new com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + certificates_.makeImmutable(); + result.certificates_ = certificates_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain) { + return mergeFrom( + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + other) { + if (other + == com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.getDefaultInstance()) + return this; + if (!other.certificates_.isEmpty()) { + if (certificates_.isEmpty()) { + certificates_ = other.certificates_; + bitField0_ |= 0x00000001; + } else { + ensureCertificatesIsMutable(); + certificates_.addAll(other.certificates_); + } + 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(); + ensureCertificatesIsMutable(); + certificates_.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 certificates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCertificatesIsMutable() { + if (!certificates_.isModifiable()) { + certificates_ = new com.google.protobuf.LazyStringArrayList(certificates_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @return A list containing the certificates. + */ + public com.google.protobuf.ProtocolStringList getCertificatesList() { + certificates_.makeImmutable(); + return certificates_; + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @return The count of certificates. + */ + public int getCertificatesCount() { + return certificates_.size(); + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @param index The index of the element to return. + * @return The certificates at the given index. + */ + public java.lang.String getCertificates(int index) { + return certificates_.get(index); + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @param index The index of the value to return. + * @return The bytes of the certificates at the given index. + */ + public com.google.protobuf.ByteString getCertificatesBytes(int index) { + return certificates_.getByteString(index); + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @param index The index to set the value at. + * @param value The certificates to set. + * @return This builder for chaining. + */ + public Builder setCertificates(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @param value The certificates to add. + * @return This builder for chaining. + */ + public Builder addCertificates(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @param values The certificates to add. + * @return This builder for chaining. + */ + public Builder addAllCertificates(java.lang.Iterable values) { + ensureCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificates_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @return This builder for chaining. + */ + public Builder clearCertificates() { + certificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+         * The certificates that form the CA chain, from leaf to root order.
+         * 
+ * + * repeated string certificates = 1; + * + * @param value The bytes of the certificates to add. + * @return This builder for chaining. + */ + public Builder addCertificatesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCertificatesIsMutable(); + certificates_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain) + } + + // @@protoc_insertion_point(class_scope:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain) + private static final com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain(); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RegionalCertChain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CA_CERTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain> + caCerts_; + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain> + getCaCertsList() { + return caCerts_; + } + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder> + getCaCertsOrBuilderList() { + return caCerts_; + } + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + @java.lang.Override + public int getCaCertsCount() { + return caCerts_.size(); + } + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + getCaCerts(int index) { + return caCerts_.get(index); + } + + /** + * + * + *
+     * The PEM encoded CA certificate chains for memorystore managed
+     * server authentication
+     * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder + getCaCertsOrBuilder(int index) { + return caCerts_.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 < caCerts_.size(); i++) { + output.writeMessage(1, caCerts_.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 < caCerts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, caCerts_.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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority)) { + return super.equals(obj); + } + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + other = + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + obj; + + if (!getCaCertsList().equals(other.getCaCertsList())) 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 (getCaCertsCount() > 0) { + hash = (37 * hash) + CA_CERTS_FIELD_NUMBER; + hash = (53 * hash) + getCaCertsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + 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; + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * Protobuf type {@code + * google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority) + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.class, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.Builder.class); + } + + // Construct using + // com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (caCertsBuilder_ == null) { + caCerts_ = java.util.Collections.emptyList(); + } else { + caCerts_ = null; + caCertsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_descriptor; + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + getDefaultInstanceForType() { + return com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + build() { + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + buildPartial() { + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + result = + new com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + result) { + if (caCertsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + caCerts_ = java.util.Collections.unmodifiableList(caCerts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.caCerts_ = caCerts_; + } else { + result.caCerts_ = caCertsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) { + return mergeFrom( + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + other) { + if (other + == com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance()) return this; + if (caCertsBuilder_ == null) { + if (!other.caCerts_.isEmpty()) { + if (caCerts_.isEmpty()) { + caCerts_ = other.caCerts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCaCertsIsMutable(); + caCerts_.addAll(other.caCerts_); + } + onChanged(); + } + } else { + if (!other.caCerts_.isEmpty()) { + if (caCertsBuilder_.isEmpty()) { + caCertsBuilder_.dispose(); + caCertsBuilder_ = null; + caCerts_ = other.caCerts_; + bitField0_ = (bitField0_ & ~0x00000001); + caCertsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCaCertsFieldBuilder() + : null; + } else { + caCertsBuilder_.addAllMessages(other.caCerts_); + } + } + } + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + m = + input.readMessage( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.parser(), + extensionRegistry); + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(m); + } else { + caCertsBuilder_.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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain> + caCerts_ = java.util.Collections.emptyList(); + + private void ensureCaCertsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + caCerts_ = + new java.util.ArrayList< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain>(caCerts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder> + caCertsBuilder_; + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public java.util.List< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain> + getCaCertsList() { + if (caCertsBuilder_ == null) { + return java.util.Collections.unmodifiableList(caCerts_); + } else { + return caCertsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public int getCaCertsCount() { + if (caCertsBuilder_ == null) { + return caCerts_.size(); + } else { + return caCertsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + getCaCerts(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder setCaCerts( + int index, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.set(index, value); + onChanged(); + } else { + caCertsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder setCaCerts( + int index, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder + builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.set(index, builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.add(value); + onChanged(); + } else { + caCertsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + int index, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain + value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.add(index, value); + onChanged(); + } else { + caCertsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder + builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder addCaCerts( + int index, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder + builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(index, builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder addAllCaCerts( + java.lang.Iterable< + ? extends + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain> + values) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, caCerts_); + onChanged(); + } else { + caCertsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder clearCaCerts() { + if (caCertsBuilder_ == null) { + caCerts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + caCertsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public Builder removeCaCerts(int index) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.remove(index); + onChanged(); + } else { + caCertsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder + getCaCertsBuilder(int index) { + return internalGetCaCertsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder + getCaCertsOrBuilder(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder> + getCaCertsOrBuilderList() { + if (caCertsBuilder_ != null) { + return caCertsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(caCerts_); + } + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder + addCaCertsBuilder() { + return internalGetCaCertsFieldBuilder() + .addBuilder( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.getDefaultInstance()); + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder + addCaCertsBuilder(int index) { + return internalGetCaCertsFieldBuilder() + .addBuilder( + index, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.getDefaultInstance()); + } + + /** + * + * + *
+       * The PEM encoded CA certificate chains for memorystore managed
+       * server authentication
+       * 
+ * + * + * repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * + */ + public java.util.List< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder> + getCaCertsBuilderList() { + return internalGetCaCertsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder> + internalGetCaCertsFieldBuilder() { + if (caCertsBuilder_ == null) { + caCertsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChain.Builder, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.RegionalCertChainOrBuilder>( + caCerts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + caCerts_ = null; + } + return caCertsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority) + } + + // @@protoc_insertion_point(class_scope:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority) + private static final com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority(); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RegionalManagedCertificateAuthority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int serverCaCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object serverCa_; + + public enum ServerCaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MANAGED_SERVER_CA(2), + SERVERCA_NOT_SET(0); + private final int value; + + private ServerCaCase(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 ServerCaCase valueOf(int value) { + return forNumber(value); + } + + public static ServerCaCase forNumber(int value) { + switch (value) { + case 2: + return MANAGED_SERVER_CA; + case 0: + return SERVERCA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ServerCaCase getServerCaCase() { + return ServerCaCase.forNumber(serverCaCase_); + } + + public static final int MANAGED_SERVER_CA_FIELD_NUMBER = 2; + + /** + * + * + *
+   * CA certificate chains for memorystore managed server authentication.
+   * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + * + * @return Whether the managedServerCa field is set. + */ + @java.lang.Override + public boolean hasManagedServerCa() { + return serverCaCase_ == 2; + } + + /** + * + * + *
+   * CA certificate chains for memorystore managed server authentication.
+   * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + * + * @return The managedServerCa. + */ + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + getManagedServerCa() { + if (serverCaCase_ == 2) { + return (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance(); + } + + /** + * + * + *
+   * CA certificate chains for memorystore managed server authentication.
+   * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder() { + if (serverCaCase_ == 2) { + return (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project and
+   * location using the form:
+   * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+   * 
+ * + * 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. Unique name of the resource in this scope including project and
+   * location using the form:
+   * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+   * 
+ * + * 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; + } + } + + 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 (serverCaCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + serverCa_); + } + 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 (serverCaCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + serverCa_); + } + 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.memorystore.v1beta.SharedRegionalCertificateAuthority)) { + return super.equals(obj); + } + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority other = + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority) obj; + + if (!getName().equals(other.getName())) return false; + if (!getServerCaCase().equals(other.getServerCaCase())) return false; + switch (serverCaCase_) { + case 2: + if (!getManagedServerCa().equals(other.getManagedServerCa())) 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(); + switch (serverCaCase_) { + case 2: + hash = (37 * hash) + MANAGED_SERVER_CA_FIELD_NUMBER; + hash = (53 * hash) + getManagedServerCa().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority 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.memorystore.v1beta.SharedRegionalCertificateAuthority parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority 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.memorystore.v1beta.SharedRegionalCertificateAuthority parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority 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.memorystore.v1beta.SharedRegionalCertificateAuthority + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + 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.memorystore.v1beta.SharedRegionalCertificateAuthority parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority 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.memorystore.v1beta.SharedRegionalCertificateAuthority 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; + } + + /** + * + * + *
+   * Shared regional certificate authority for an instance.
+   * 
+ * + * Protobuf type {@code google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority) + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.class, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.Builder.class); + } + + // Construct using + // com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (managedServerCaBuilder_ != null) { + managedServerCaBuilder_.clear(); + } + name_ = ""; + serverCaCase_ = 0; + serverCa_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.memorystore.v1beta.V1mainProto + .internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_descriptor; + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + getDefaultInstanceForType() { + return com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority build() { + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority buildPartial() { + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority result = + new com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority result) { + result.serverCaCase_ = serverCaCase_; + result.serverCa_ = this.serverCa_; + if (serverCaCase_ == 2 && managedServerCaBuilder_ != null) { + result.serverCa_ = managedServerCaBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority) { + return mergeFrom( + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority other) { + if (other + == com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getServerCaCase()) { + case MANAGED_SERVER_CA: + { + mergeManagedServerCa(other.getManagedServerCa()); + break; + } + case SERVERCA_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_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetManagedServerCaFieldBuilder().getBuilder(), extensionRegistry); + serverCaCase_ = 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 serverCaCase_ = 0; + private java.lang.Object serverCa_; + + public ServerCaCase getServerCaCase() { + return ServerCaCase.forNumber(serverCaCase_); + } + + public Builder clearServerCa() { + serverCaCase_ = 0; + serverCa_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.Builder, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthorityOrBuilder> + managedServerCaBuilder_; + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + * + * @return Whether the managedServerCa field is set. + */ + @java.lang.Override + public boolean hasManagedServerCa() { + return serverCaCase_ == 2; + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + * + * @return The managedServerCa. + */ + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + getManagedServerCa() { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 2) { + return (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance(); + } else { + if (serverCaCase_ == 2) { + return managedServerCaBuilder_.getMessage(); + } + return com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance(); + } + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + public Builder setManagedServerCa( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + value) { + if (managedServerCaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serverCa_ = value; + onChanged(); + } else { + managedServerCaBuilder_.setMessage(value); + } + serverCaCase_ = 2; + return this; + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + public Builder setManagedServerCa( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.Builder + builderForValue) { + if (managedServerCaBuilder_ == null) { + serverCa_ = builderForValue.build(); + onChanged(); + } else { + managedServerCaBuilder_.setMessage(builderForValue.build()); + } + serverCaCase_ = 2; + return this; + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + public Builder mergeManagedServerCa( + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + value) { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 2 + && serverCa_ + != com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance()) { + serverCa_ = + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.newBuilder( + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + serverCa_) + .mergeFrom(value) + .buildPartial(); + } else { + serverCa_ = value; + } + onChanged(); + } else { + if (serverCaCase_ == 2) { + managedServerCaBuilder_.mergeFrom(value); + } else { + managedServerCaBuilder_.setMessage(value); + } + } + serverCaCase_ = 2; + return this; + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + public Builder clearManagedServerCa() { + if (managedServerCaBuilder_ == null) { + if (serverCaCase_ == 2) { + serverCaCase_ = 0; + serverCa_ = null; + onChanged(); + } + } else { + if (serverCaCase_ == 2) { + serverCaCase_ = 0; + serverCa_ = null; + } + managedServerCaBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.Builder + getManagedServerCaBuilder() { + return internalGetManagedServerCaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + @java.lang.Override + public com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder() { + if ((serverCaCase_ == 2) && (managedServerCaBuilder_ != null)) { + return managedServerCaBuilder_.getMessageOrBuilder(); + } else { + if (serverCaCase_ == 2) { + return (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + serverCa_; + } + return com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance(); + } + } + + /** + * + * + *
+     * CA certificate chains for memorystore managed server authentication.
+     * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.Builder, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthorityOrBuilder> + internalGetManagedServerCaFieldBuilder() { + if (managedServerCaBuilder_ == null) { + if (!(serverCaCase_ == 2)) { + serverCa_ = + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.getDefaultInstance(); + } + managedServerCaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority.Builder, + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthorityOrBuilder>( + (com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority) + serverCa_, + getParentForChildren(), + isClean()); + serverCa_ = null; + } + serverCaCase_ = 2; + onChanged(); + return managedServerCaBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Unique name of the resource in this scope including project and
+     * location using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * 
+ * + * 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. Unique name of the resource in this scope including project and
+     * location using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * 
+ * + * 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. Unique name of the resource in this scope including project and
+     * location using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Unique name of the resource in this scope including project and
+     * location using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Unique name of the resource in this scope including project and
+     * location using the form:
+     * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority) + } + + // @@protoc_insertion_point(class_scope:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority) + private static final com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority(); + } + + public static com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SharedRegionalCertificateAuthority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + 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.memorystore.v1beta.SharedRegionalCertificateAuthority + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthorityName.java b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthorityName.java new file mode 100644 index 000000000000..b2660f367fbf --- /dev/null +++ b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthorityName.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. + */ + +package com.google.cloud.memorystore.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 SharedRegionalCertificateAuthorityName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/sharedRegionalCertificateAuthority"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected SharedRegionalCertificateAuthorityName() { + project = null; + location = null; + } + + private SharedRegionalCertificateAuthorityName(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 SharedRegionalCertificateAuthorityName 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 SharedRegionalCertificateAuthorityName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, + "SharedRegionalCertificateAuthorityName.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 (SharedRegionalCertificateAuthorityName 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()) { + SharedRegionalCertificateAuthorityName that = ((SharedRegionalCertificateAuthorityName) 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}/sharedRegionalCertificateAuthority. */ + 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(SharedRegionalCertificateAuthorityName sharedRegionalCertificateAuthorityName) { + this.project = sharedRegionalCertificateAuthorityName.project; + this.location = sharedRegionalCertificateAuthorityName.location; + } + + public SharedRegionalCertificateAuthorityName build() { + return new SharedRegionalCertificateAuthorityName(this); + } + } +} diff --git a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthorityOrBuilder.java b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthorityOrBuilder.java new file mode 100644 index 000000000000..d7079f09f04d --- /dev/null +++ b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/SharedRegionalCertificateAuthorityOrBuilder.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/cloud/memorystore/v1beta/memorystore.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.memorystore.v1beta; + +@com.google.protobuf.Generated +public interface SharedRegionalCertificateAuthorityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * CA certificate chains for memorystore managed server authentication.
+   * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + * + * @return Whether the managedServerCa field is set. + */ + boolean hasManagedServerCa(); + + /** + * + * + *
+   * CA certificate chains for memorystore managed server authentication.
+   * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + * + * @return The managedServerCa. + */ + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthority + getManagedServerCa(); + + /** + * + * + *
+   * CA certificate chains for memorystore managed server authentication.
+   * 
+ * + * + * .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * + */ + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority + .RegionalManagedCertificateAuthorityOrBuilder + getManagedServerCaOrBuilder(); + + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project and
+   * location using the form:
+   * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Unique name of the resource in this scope including project and
+   * location using the form:
+   * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.ServerCaCase + getServerCaCase(); +} diff --git a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/V1mainProto.java b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/V1mainProto.java index c611cf494f9d..69545e9525bc 100644 --- a/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/V1mainProto.java +++ b/java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/V1mainProto.java @@ -140,6 +140,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_memorystore_v1beta_CertificateAuthority_ManagedCertificateAuthority_CertChain_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_memorystore_v1beta_CertificateAuthority_ManagedCertificateAuthority_CertChain_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_RegionalCertChain_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_memorystore_v1beta_SharedRegionalCertificateAuthority_RegionalManagedCertificateAuthority_RegionalCertChain_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_memorystore_v1beta_GetSharedRegionalCertificateAuthorityRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_memorystore_v1beta_GetSharedRegionalCertificateAuthorityRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_memorystore_v1beta_OperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -160,7 +176,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "havior.proto\032\033google/api/field_info.prot" + "o\032\031google/api/resource.proto\032#google/lon" + "grunning/operations.proto\032\033google/protobuf/empty.proto\032" - + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\200\026\n" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\306\032\n" + "\010Instance\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" @@ -200,10 +216,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tendpoints\030\031 \003(\0132:.google" + ".cloud.memorystore.v1beta.Instance.InstanceEndpointB\003\340A\001\022A\n" + "\004mode\030\032 \001(\0162..google." - + "cloud.memorystore.v1beta.Instance.ModeB\003\340A\001\032\374\001\n" + + "cloud.memorystore.v1beta.Instance.ModeB\003\340A\001\022[\n" + + "\016server_ca_mode\0308 \001(\01626.google.clo" + + "ud.memorystore.v1beta.Instance.ServerCaModeB\006\340A\001\340A\005H\002\210\001\001\022G\n" + + "\016server_ca_pool\0309 \001(\tB*\340A\001\340A\005\372A!\n" + + "\037privateca.googleapis.com/CaPoolH\003\210\001\001\022.\n" + + "\031rotate_server_certificate\030:" + + " \001(\010B\006\340A\001\340A\004H\004\210\001\001\032\374\001\n" + "\tStateInfo\022Z\n" - + "\013update_info\030\001 \001(\0132>" - + ".google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfoB\003\340A\003H\000\032\212\001\n\n" + + "\013update_info\030\001 \001(\0132>.google.cloud.memorystore." + + "v1beta.Instance.StateInfo.UpdateInfoB\003\340A\003H\000\032\212\001\n\n" + "UpdateInfo\022$\n" + "\022target_shard_count\030\001 \001(\005B\003\340A\003H\000\210\001\001\022&\n" + "\024target_replica_count\030\002 \001(\005B\003\340A\003H\001\210\001\001B\025\n" @@ -211,20 +233,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\025_target_replica_countB\006\n" + "\004info\032h\n" + "\020InstanceEndpoint\022T\n" - + "\013connections\030\001 \003(\0132:.google.cloud.memor" - + "ystore.v1beta.Instance.ConnectionDetailB\003\340A\001\032\275\001\n" + + "\013connections\030\001 \003(\0132:.goog" + + "le.cloud.memorystore.v1beta.Instance.ConnectionDetailB\003\340A\001\032\275\001\n" + "\020ConnectionDetail\022Q\n" - + "\023psc_auto_connection\030\001" - + " \001(\01322.google.cloud.memorystore.v1beta.PscAutoConnectionH\000\022H\n" + + "\023psc_auto_connection\030\001 \001(\01322.google.cl" + + "oud.memorystore.v1beta.PscAutoConnectionH\000\022H\n" + "\016psc_connection\030\002" + " \001(\0132..google.cloud.memorystore.v1beta.PscConnectionH\000B\014\n\n" + "connection\032-\n" + "\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\0324\n" - + "\022EngineConfigsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r" + "\n" + + "\005value\030\002 \001(\t:\0028\001\0324\n" + + "\022EngineConfigsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"T\n" + "\005State\022\025\n" + "\021STATE_UNSPECIFIED\020\000\022\014\n" @@ -250,12 +272,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020MODE_UNSPECIFIED\020\000\022\022\n\n" + "STANDALONE\020\001\032\002\010\001\022\013\n" + "\007CLUSTER\020\002\022\024\n" - + "\020CLUSTER_DISABLED\020\004:{\352Ax\n" - + "#memorystore.googleapis.com/I" - + "nstance\022 future = + memorystoreClient.getSharedRegionalCertificateAuthorityCallable().futureCall(request); + // Do something. + SharedRegionalCertificateAuthority response = future.get(); + } + } +} +// [END memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_async] diff --git a/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthority.java b/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthority.java new file mode 100644 index 000000000000..ba05c562a070 --- /dev/null +++ b/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthority.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.memorystore.v1beta.samples; + +// [START memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync] +import com.google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest; +import com.google.cloud.memorystore.v1beta.MemorystoreClient; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthorityName; + +public class SyncGetSharedRegionalCertificateAuthority { + + public static void main(String[] args) throws Exception { + syncGetSharedRegionalCertificateAuthority(); + } + + public static void syncGetSharedRegionalCertificateAuthority() 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 (MemorystoreClient memorystoreClient = MemorystoreClient.create()) { + GetSharedRegionalCertificateAuthorityRequest request = + GetSharedRegionalCertificateAuthorityRequest.newBuilder() + .setName( + SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + SharedRegionalCertificateAuthority response = + memorystoreClient.getSharedRegionalCertificateAuthority(request); + } + } +} +// [END memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync] diff --git a/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthoritySharedregionalcertificateauthorityname.java b/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthoritySharedregionalcertificateauthorityname.java new file mode 100644 index 000000000000..57bed2bcff98 --- /dev/null +++ b/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthoritySharedregionalcertificateauthorityname.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.memorystore.v1beta.samples; + +// [START memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_Sharedregionalcertificateauthorityname_sync] +import com.google.cloud.memorystore.v1beta.MemorystoreClient; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthorityName; + +public class SyncGetSharedRegionalCertificateAuthoritySharedregionalcertificateauthorityname { + + public static void main(String[] args) throws Exception { + syncGetSharedRegionalCertificateAuthoritySharedregionalcertificateauthorityname(); + } + + public static void + syncGetSharedRegionalCertificateAuthoritySharedregionalcertificateauthorityname() + 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 (MemorystoreClient memorystoreClient = MemorystoreClient.create()) { + SharedRegionalCertificateAuthorityName name = + SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]"); + SharedRegionalCertificateAuthority response = + memorystoreClient.getSharedRegionalCertificateAuthority(name); + } + } +} +// [END memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_Sharedregionalcertificateauthorityname_sync] diff --git a/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthorityString.java b/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthorityString.java new file mode 100644 index 000000000000..04f6c61e69ec --- /dev/null +++ b/java-valkey/samples/snippets/generated/com/google/cloud/memorystore/v1beta/memorystore/getsharedregionalcertificateauthority/SyncGetSharedRegionalCertificateAuthorityString.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.memorystore.v1beta.samples; + +// [START memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_String_sync] +import com.google.cloud.memorystore.v1beta.MemorystoreClient; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority; +import com.google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthorityName; + +public class SyncGetSharedRegionalCertificateAuthorityString { + + public static void main(String[] args) throws Exception { + syncGetSharedRegionalCertificateAuthorityString(); + } + + public static void syncGetSharedRegionalCertificateAuthorityString() 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 (MemorystoreClient memorystoreClient = MemorystoreClient.create()) { + String name = SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString(); + SharedRegionalCertificateAuthority response = + memorystoreClient.getSharedRegionalCertificateAuthority(name); + } + } +} +// [END memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_String_sync]